abstract:<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>微博发布</title> &nbs
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>微博发布</title> <style type="text/css"> body{font-size:12px;}/* 设置所有的字体大小 */ .box{margin:0px auto;border:8px solid pink;width:600px;height:160px;padding:10px;}/* 设置位置边框和大小 */ .box img{float:left;height:24px;} .boxtext{float:left;margin-left:280px;} #text{width:600px;height:100px;margin-top:8px;border:1px solid #888;} .box #sp1,#sp2,#sp3,#sp4,#sp5,#sp6{float:left;width:30px;height:32px;line-height:32px;padding-left:28px;} #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{width:40px;background:url(images/an1.png) no-repeat left center;}/* 设置长微博的图标 */ #sp6{margin-left:150px;margin-right:5px;} /* 设置公开的位置 */ #bt{border:none; background:#ffc09f;float:left;width:80px;height:24px;color:#fff;border-radius:5px;}/* 设置发布按钮样式 */ </style> </head> <body> <div class="box"> <img src="images/12.png" alt="" /><!--设置图片,大小高度以图片的为准--> <div class="boxtext">还可以输入<span id="number"></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>
样式调整很重要,图片的大小,放置空间都要精确才会不出现问题。