摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>微博输入</title>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>微博输入</title> <style type="text/css"> *{margin: 0;padding: 0} .box{width: 600px;height: 160px;border: 10px solid pink;margin: 0 auto;padding: 10px;} img{float: left} .box1{float: left;margin-left: 355px;width: 150px;height: 24px;text-align: right;font-size:14px;color: #888;} .box1 span{font-size: 16px;font-weight: bold;} #text{width: 600px;height: 100px;border: 1px solid #888;margin-top: 5px;} .img-tt{float: left;height: 32px;margin-right: 5px;line-height: 32px;} .box input{float: right} #gk{margin-left: 280px;} #fabu{width: 82px;height: 30px;border: none;background-color: orange;border-radius: 5px;} </style> </head> <body> <div class="box"> <img src="/"> <div class="box1">还可以输入<span id="number">123</span>字</div> <textarea id="text"></textarea> <span class="img-tt">表情</span> <span class="img-tt">图片</span> <span class="img-tt">视频</span> <span class="img-tt">话题</span> <span class="img-tt">长微博</span> <span class="img-tt" id="gk">公开</span> <input type="button" value="发布" id="fabu"> </div> </body> </html>
理解:
把这个布局分为三块,1输入字数显示;2文本域;3发布按钮
把一个大的东西细分后就更容易明白。
效果图: