ఎలా సృష్టించాలి: ఇమెయిల్ కమ్యూనికేషన్
CSS ఉపయోగించి ఇమెయిల్ కమ్యూనికేషన్ సృష్టించండి ఎలా నేర్చుకోండి.
మా న్యూస్లెటర్ కు సబ్స్క్రయిబ్ చేయండి
మా న్యూస్లెటర్ కు చేరండి ఎందుకు ఉంది బ్లాబ్లా. మా న్యూస్లెటర్ కు చేరండి ఎందుకు ఉంది బ్లాబ్లా. మా న్యూస్లెటర్ కు చేరండి ఎందుకు ఉంది బ్లాబ్లా.
న్యూస్లెటర్ సబ్స్క్రిబ్షన్ సృష్టించండి ఎలా?
మొదటి చర్య - HTML జోడించండి:
<form> ఎలంజంట్ను ఉపయోగించండి. మా PHP ట్యూటోరియల్స్లో మరింత సమాచారం పొందండి.
ప్రతి ఫీల్డ్కు ఇన్పుట్ కంట్రోల్స్ మరియు 'సబ్మిట్' బటన్ను జోడించండి:
<form action="action_page.php"> <div class="container"> <h2>Subscribe to our Newsletter</h2> <p>Lorem ipsum..</p> </div> <div class="container" style="background-color:white"> <input type="text" placeholder="Name" name="name" required> <input type="text" placeholder="Email address" name="mail" required> <label> <input type="checkbox" checked="checked" name="subscribe"> Daily Newsletter </label> </div> <div class="container"> <input type="submit" value="Subscribe"> </div> </form>
第二步 - 添加 CSS:
/* 为表单元素设置样式,使其周围带有边框 */ form { border: 4px solid #f1f1f1; } /* 为容器添加一些内边距和灰色背景色 */ .container { padding: 20px; background-color: #f1f1f1; } /* 设置输入元素和提交按钮的样式 */ input[type=text], input[type=submit] { width: 100%; padding: 12px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; box-sizing: border-box; } /* 为复选框添加外边距 */ input[type=checkbox] { margin-top: 16px; } /* 设置提交按钮的样式 */ input[type=submit] { background-color: #04AA6D; color: white; border: none; } input[type=submit]:hover { opacity: 0.8; }
相关页面
教程:HTML 表单
教程:CSS 表单