为什么“表情”“图片”前面插入的图片使用的是“background-image”,而不是用img</

Original 2019-03-24 19:16:47 306
abstract:<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>为什么“表情”“图片”前面插入的图片使用的是“background-image”,而不是用img</tit

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>为什么“表情”“图片”前面插入的图片使用的是“background-image”,而不是用img</title>
   <style>
     body{font-size:12px;}
     .box{
       width:600px;
       height:160px;
       border:10px solid pink;
       margin:20px auto;
       padding:10px;
     }
     .box1{
       float:right;
       margin-right:4px;
       font-size:14px;
       color: #888;
     }
     #number{
       font-size:16px;
       font-weight:bold;
     }
     #text{
       width:600px;
       height:100px;
       display:block;
     }
     #sp1,#sp2,#sp3,#sp4,#sp5,#sp6{
       width:30px;
       height:32px;
       line-height:32px;
       padding-left:22px;
       margin-right:8px;
     }
     #sp1{background:url(static/images/an5.png) no-repeat left 45%;background-size:46%;}
     #sp2{background:url(static/images/an4.png) no-repeat left 45%;background-size:46%;}
     #sp3{background:url(static/images/an3.png) no-repeat left 45%;background-size:46%;}
     #sp4{background:url(static/images/an2.png) no-repeat left 45%;background-size:46%;}
     #sp5{background:url(static/images/an1.png) no-repeat left 45%;background-size:46%;}

     #sp6{margin-left:160px;color:#888;}

     #bt{width:80px;height:30px;border:none;outline:none;color:#fff;background:orange;position:relative;right:-9px;top:2px;}
   </style>
</head>
<body>
<div class="box">
 <img src="static/images/12.png">
 <div class="box1">还可以输入<span id="number">140</span>字</div>
 <textarea id="text"></textarea>
 <span id="sp1">表情</span>
 <span id="sp2">图片</span>
 <span id="sp3">视频</span>
 <span id="sp4">话题</span>
 <span id="sp5">长微博</span>
 <span id="sp6">公开</span>
 <input type="button" value="发布" id="bt">
</div>
</body>
</html>

Release Notes

Popular Entries