我想添加一個位於邊界頂部的圖標,將它分成兩半。css背景圖像定位(負位置?)
這是我到目前爲止有:
<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>
相反的圖像是在邊境就像我希望,它在它之下。
在某些情況下,這將打破現有的用戶界面,然後嘗試改變位置是「絕對」 – didxga 2014-05-14 03:15:36