为了账号安全,请及时绑定邮箱和手机立即绑定

标签字太多将图片向上顶,求解决

标签字太多将图片向上顶,求解决

米脂 2019-04-18 18:15:25
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>简单的文件树效果</title> <meta content="text/html; charset=utf-8" /> <script type="text/javascript" src="jquery.min.js"></script> <style type="text/css">   .mould{     width: 120px;     height: 160px;     display: inline-block;     margin:0px 10px 30px 10px;     font-size: 12px;     text-align: center;   }   .mould img{     border: 1px solid black;   }   .mould span{   } </style> </head> <body>   <div>     <div id="list">        <div class="mould">         <img height="120" width="120" src="folder.png">         <input type="checkbox">         <span>大法师打发打发是打发打萨达</span>        </div>        <div class="mould">         <img height="120" width="120" src="folder.png">         <input type="checkbox">         <span>大法师</span>        </div>     </div>   </div> </body> </html>需求:打开页面会看见,两个图片不在一个水平线上,原因为下面的span标签字体过多导致将图片向上顶,这里面标签可以随便换,样式随便写,只要能满足两个图片平齐就好
查看完整描述

4 回答

?
Smart猫小萌

TA贡献1911条经验 获得超7个赞

 将display: inline-block;换成float:left



查看完整回答
反对 回复 2019-05-13
  • 4 回答
  • 0 关注
  • 304 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号