现在,"标签"放在一个跨度中,而跨度又放入标签中,当您在输入字段中写入文本时,标签会落在文本上.
当您填写输入字段并单击该输入字段外部时,标签不应该返回.
我怎样才能做到这一点?
见链接:http://jsbin.com/semamimitu/edit?html,css,output
body {
background: url("http://www.planwallpaper.com/static/images/colorful-triangles-background_yB0qTG6.jpg") no-repeat center center fixed;
object-fit: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: 100% 100%;
}
.form-register {
position: absolute;
top: 50%;
transform: translateY(-50%) translateX(-50%);
left: 50%;
max-width: 320px;
}
.register-container{
background: #fff;
padding: 0 25px 25px;
}
.register-container .entity{
width: -webkit-calc(100% - 50px);
width: -moz-calc(100% - 50px);
width: calc(100% + 50px);
left: -25px;
margin-bottom: 25px;
}
.register-container .entity .btn {
width: 160px;
border: none;
border-radius: 0;
padding: 8px; …Run Code Online (Sandbox Code Playgroud)