【发布时间】:2009-06-28 00:44:58
【问题描述】:
我正在尝试添加一个位于边框顶部的图标,将其分成两半。
这是我目前所拥有的:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
body {
background-color:#26140C;
}
.box {
width: 800px;
margin: 0 auto;
margin-top: 40px;
padding: 10px;
border: 3px solid #A5927C;
background-color: #3D2216;
background-image: url(Contents/img/icon_neutral.png);
background-repeat: no-repeat;
background-position:10px -20px;
}
</style>
</head>
<body>
<div class="box">
<h1>This is a test!</h1>
</div>
</body>
图像不是像我希望的那样超出边界,而是在边界之下。
【问题讨论】: