好的,當調整瀏覽器的大小時,輸入字段不能正確調整大小,並且在媒體腳本啓動並將所有內容設置爲100%之前會在中間相互重疊併發生扭曲。文本區域寬度100%不符合表單。與此聯繫人的形式處理已經疲憊不堪,我還沒有想弄清楚如何得到它發送電子郵件還笑......輸入字段不能正確調整大小與瀏覽器
獎金的問題:爲什麼輸入必須包裹在一個跨度或完全忽略父母divs的界限?
根據請求,這裏是JSFIDDLE腳本。 https://jsfiddle.net/LxLux35m/1/
.Block {
\t width: 100%;
\t background-color: #edeeef;
\t padding: 50px 0;
}
.Block:nth-of-type(odd) {
\t background-color: #ffffff;
}
.Block:After {
\t content: '';
\t display: block;
\t clear: both;
\t overflow: hidden;
\t Zoom: 1;
\t height: 0;
}
.BlockWrapper {
\t text-align: center;
\t Max-Width: 60%;
\t margin: 0 auto;
}
.BlockSizer1, .BlockSizer2, .BlockSizer3 {
\t float: left;
\t text-align: left;
}
.BlockSizer1 {
\t Width: 100%;
}
.BlockSizer2 {
\t width: 49%;
}
.BlockSizer3 {
\t width: 33%;
}
#ContactForm {
\t Padding: 5px;
}
#ContactForm span {
\t width: 49%;
\t padding: 5px 0 0 0;
\t display: inline-block;
}
#ContactForm > .textarea {
\t width: 100%;
}
#ContactForm > .textarea textarea {
\t width: 98%;
\t Min-Height: 200px;
\t margin: 1em 0 1em 0em;
}
#ContactForm input {
\t width: 92%;
\t color: #999999;
\t outline: none;
\t padding: 10px;
\t Border: 1px solid #a0a0a0;
}
.ContactFormButton, .ContactFormButton input {
\t Width: 100% !important;
}
@Media screen and (max-width: 1000px) {
\t div.ContactForm, div.ContactFormRight {
\t \t width: 100%;
\t \t Margin: 5px 0;
\t \t float: none;
\t \t padding: 0;
\t }
}
textarea.ContactForm {
\t width: 100%;
\t padding: 10px;
\t Min-Height: 200px;
}
<div class="Block">
\t \t <div class="BlockWrapper">
\t \t \t <div class="BlockSizer2">
\t \t \t \t <form ID="ContactForm" action="#" method="post">
\t \t \t \t \t <h1>Contact Me</h1>
\t \t \t \t \t <p>Lorem ipsum primis in faucibus. Praesent faucibus massa elit, vitae ultrices libero dapibus nec. Maecenas cursus rutrum odio ut convallis. Curabitur viverra est in diam tincidunt, nec tincidunt tortor dapibus.</p>
\t \t \t \t \t <span><input type="text" name="Name" placeholder="Name" required="" /></span>
\t \t \t \t \t <span class="ContactFormRight"><input class="" type="text" name="Subject" placeholder="Company Name" required="" /></span>
\t \t \t \t \t <span><input type="email" name="Email" placeholder="Email" required="" /></span>
\t \t \t \t \t <span class="ContactFormRight"><input type="text" name="Phone" placeholder="Phone" required="" /></span>
\t \t \t \t \t <span class="textarea"><textarea name="Message" placeholder="Message..." required></textarea></span>
\t \t \t \t \t <span class="ContactFormButton"><input type="submit" value="Submit"></span>
\t \t \t \t </form>
\t \t \t </div>
\t \t \t <div class="BlockSizer2">
\t \t \t \t
\t \t \t </div>
\t \t </div>
\t </div>
記:你的CSS屬性必須全部小寫! –
有這樣的問題,最好將代碼添加到jsfiddle。 https://jsfiddle.net/ – user3738936
嘗試使用'padding:5px 10px 0px 0px;'和'width:45%;' – PiLHA