你真的在寻找一个关于响应式设计的教程,所以我建议你仔细阅读其中的内容。但这里有一个你需要的基本示例:
http://codepen.io/pageaffairs/pen/JDrhG
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
*, *:before, *:after {-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
#mc_embed_signup{ clear:left; font:14px Helvetica,Arial,sans-serif; width: 80%; margin: 0 auto;}
#mc_embed_signup form {display:block; position:relative; text-align:left;}
#mc_embed_signup input {border:1px solid #999; -webkit-appearance:none;}
#mc_embed_signup input:focus {border-color:#333;}
#mc_embed_signup .button {clear:both; background-color: #aaa; border: 0 none; border-radius:4px; color: #FFFFFF; cursor: pointer; display: inline-block; font-size:15px; font-weight: bold; height: 32px; line-height: 32px; margin: 0 5px 10px 0; padding:0; text-align: center; text-decoration: none; vertical-align: top; white-space: nowrap; width: auto;}
#mc_embed_signup .button:hover {background-color:#777;}
#mc_embed_signup .small-meta {font-size: 11px;}
#mc_embed_signup .nowrap {white-space:nowrap;}
#mc_embed_signup .clear {clear:none; display: inline-block; width: 31%; vertical-align: top;}
#mc_embed_signup label {display:inline-block; font-size:16px; padding-bottom:10px; font-weight:bold; width: 31%;vertical-align: top;}
#mc_embed_signup input.email {display:inline-block; padding:8px 0; margin:0 10px 10px 0; text-indent:5px; width:34%;vertical-align: top;}
#mc_embed_signup input.button {display:block; width:100%; margin:0 0 10px 0;}
@media screen and (max-width: 780px) {
#mc_embed_signup {width: 100%;}
#mc_embed_signup label, #mc_embed_signup input.email, #mc_embed_signup .clear {display: block; width: 100%;}
}
</style>
</head>
<body>
<div id="mc_embed_signup">
<form action="#" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<label for="mce-EMAIL">Stay Connected with Tuga Sunwear</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;">
<input type="text" name="#" tabindex="-1" value="">
</div>
<div class="clear">
<input type="submit" value="Subscribe Now" name="subscribe" id="mc-embedded-subscribe" class="button">
</div>
</form>
</div>
</body>
不过,您需要将其与您的布局集成,因此需要进行更改。