<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>微博案例</title> <style> body{ font-size:14px; } #content{ border:10px solid pink; margin:10px auto; width: 600px; height:160px; padding:10px; } #zi{ float:right; color:#888; } textarea{ width: 600px; height: 100px; border:1px solid #ccc; } #sp1,#sp2,#sp3,#sp4,#sp5,#sp6{ color:#888; display: inline-block; width:30px; padding-left:26px; height:32px; line-height:32px; } #sp1{ background:url(images/an5.png) no-repeat left center; } #sp2{ background:url(images/an4.png) no-repeat left center; } #sp3{ background:url(images/an3.png) no-repeat left center; } #sp4{ background:url(images/an2.png) no-repeat left center; } #sp5{ background:url(images/an1.png) no-repeat left center; width: 45px; } #sp6{ margin-left:130px; } button{ float:right; background:#ffc09f; color: #fff; border:none; width:80px; height: 30px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } </style> </head> <body> <div id="content"> <img src="images/12.png"> <div id="zi">还可以输入<span id=""></span>字</div> <textarea></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> <button>发布</button> </div> </body> </html>
显示如下: