我正在创建一个反馈表单,我想对它产生阴影效果。我试图删除空白区域,以便我的“顶部”图像看起来更像阴影,而不是悬停在窗体上方。我试过显示块0,它仍然无法工作??
.container {
background: #fff;
border: 1px solid #ccc;
margin: auto;
text-align: left;
width: 700px;
}
.alignCenter {
margin: 1em;
}
h1 {
background-color: #dedede;
margin: 0;
min-height: 0;
padding: 0;
text-decoration: none;
text-indent: -8000px;
}
.form_margin {
margin-bottom: 1.5em;
margin-top: 3px;
}
body {
background: #ffffff;
font-family: "Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size: small;
margin: 8px 0 16px;
text-align: center;
}
.heading {
font-family: Lucida Grande, Tahoma, Arial, Verdana, sans-serif;
font-size: small;
}
.message-up {
vertical-align: top !important;
}
.form_description {
border-bottom: 1px dotted #ccc;
clear: both;
margin-bottom: 1em;
}
.headerImage {
display: block;
margin: 10px auto 0;
}
<!DOCTYPE html>
<html>
<head lang="en">
<link rel="stylesheet" type="text/css" href="css.css">
<meta charset="UTF-8">
<title>Welcome to The Mystery Man Website</title>
</head>
<body>
<div class="headerImage">
<img src="Images/top.png" alt="top" width="710 ">
</div>
<div class="container">
<h1>grey bar</h1>
<div class="alignCenter">
<form action="" method="post">
<div class="form_description">
<h2>User Feedback Form</h2>
<p>Your suggestions are very appreciated</p>
</div>
<!-- Name -->
<strong><label for="username">Name</label></strong>
<div class="form_margin">
<input type="text" name="username" size="30" id="username" placeholder="Your Full Name" />
</div>
<!--Email-->
<strong> <label for="email">Email</label> </strong>
<div class="form_margin">
<input type="email" name="email" size="30" id="email" placeholder=" Your Email" />
</div>
<!--Feedback-->
<strong> <label for="feedback">Feedback</label> </strong>
<div class="form_margin">
<textarea rows="10" cols="93" name="feedback" id="feedback" placeholder="Your Comments.."></textarea>
</div>
</form>
</div>
</div>
</body>
</html>
答案 0 :(得分:0)
试试这个: 需要在此课程中进行更改: 改变之前:
.headerImage { display: block; margin: 10px auto 0; position:absolute; width: 100%; }
更改后:
vpTabs.getLayoutParams().height = DESIRED_SIZE;
或在此处查看:JSFIDDLE NEW