我想創建一個類似的頁面:了一些要素CSS不工作
我試着做以下和無法獲得成功。
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Sign Up</title>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header">
<!--menu-->
</div>
<div class="container">
<form>
<div class="group">
<input type = "text" placeholder = "Your Name" id = "name"/>
</div>
<div class="group">
<input type = "email" placeholder = "Enter Your Email" id = "email"/>
</div>
<div class="group">
<input type = "password" placeholder = "Password" id = "password"/>
<input type = "password" placeholder = "Confirm Password" id = "password"/>
</div>
<div class="submit"><input id = "submit" type="submit" name= "formSubmit" value="CREATE A FREE ACCOUNT" class="btn"/></div>
</form>
</div>
</body>
</html>
CSS:
body{
background-image: url(images/bg.png);
background-size: cover;
background-repeat: no-repeat;
font-family: 'Roboto', sans-serif;
}
.container{
width: auto;
background-color: #FFFFFF;
height: 300px;
padding: 30px;
border-radius: 30px;
}
.forms{
background-color: #FCFCFC;
}
input{
font-family: 'Roboto', sans-serif;
border-radius: 2px;
}
input#name{
background-image: url(images/name.jpg);
background-size: 10%;
background-repeat: no-repeat;
background-position: center left;
border:none;
padding-left: 50px;
margin-top: 10px;
width: 400px;
height: 40px;
}
input#email{
margin-top: 10px;
background-image: url(images/mail.jpg);
background-size: 7%;
background-repeat: no-repeat;
background-position: center left 6px;
border:none;
padding-left: 50px;
width: 400px;
height: 40px;
font-size: :16px;
}
input#password{
margin-top: 20px;
background-image: url(images/pass.png);
background-size: 7%;
background-repeat: no-repeat;
background-position: center left 6px;
border:none;
padding-left: 50px;
width: 170px;
height: 40px;
margin-right: 4px;
}
input#submit{
margin-top: 10px;
background-color: #A5ABB0;
border: none;
height: 50px;
width: 447px;
cursor: pointer;
font-weight: 400;
font-size: 17px;
color: white;
}
.group{
margin: 18px auto;
border-bottom: 2px solid #BEBEBE;
overflow: hidden;
}
我試過幾件事情,但他們只是不發生,無法按預期一切都來了。
幫我個忙,請
嗨, 「不工作」 是不是一個好的錯誤描述。請嘗試描述究竟出了什麼問題,並考慮在http://jsfiddle.net上構建一個測試用例 –
容器的字體大小,自動調整等操作不起作用 –
請至少構建一個測試用例。 –