制作方法01
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
* {
margin:0px;
padding: 0px;
}
.box {
width: 200px;
height: 50px;
background-color: skyblue;
margin:100px;
}
s {
text-align:center;
overflow:hidden;
display:inline-block;
font-family:"宋体";
font-size:15px;
height: 15px;
width: 15px;
line-height: 3px;
text-decoration:none;
font-style:normal;
/* border:1px solid red; */
margin-top:20px;
}
</style>
</head>
<body>
<div class="box">
<s>◇</s>
</div>
</body>
</html>
制作方法02
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
* {
margin:0px;
padding: 0px;
}
.box {
width: 200px;
height: 50px;
background-color: skyblue;
margin:100px;
}
i {
height: 7px;
width: 15px;
display:inline-block;
/* border:1px solid blue; */
position:relative;
margin-top:17px;
overflow:hidden;
}
s {
text-align:center;
font-family:"宋体";
font-size:15px;
height: 15px;
width: 15px;
line-height:15px;
text-decoration:none;
font-style:normal;
position:absolute;
top:-7px;
left:0px;
}
</style>
</head>
<body>
<div class="box">
<i><s>◇</s></i>
</div>
</body>
</html>