头闻号

石家庄迪沃贸易有限公司

面膜|按摩用品|护肤膏霜

首页 > 新闻中心 > 科技常识:css 横排 实现代码
科技常识:css 横排 实现代码
发布时间:2024-09-25 09:37:03        浏览次数:3        返回列表

今天小编跟大家讲解下有关css 横排 实现代码 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关css 横排 实现代码 的相关资料,希望小伙伴们看了有所帮助。

效果预览:

css: 复制代码代码如下:<style type="text/css"> <!-- .table_tile{ text-align:left; height: 20px; width: 25%; float: left; } .table_tile_{ text-align:right; background-color:#0000FF; height: 20px; background-color:#999966; width: 25%; float: left; } .table_tile_bottom{ text-align:left; background-color:#FFF000; height: 20px; width: 25%; float: left; } --> </style> html: 复制代码代码如下:<div class="table_tr"> <div class="table_tile">top0</div> <div class="table_tile_">top1</div> <div class="table_tile">top2</div> <div class="table_tile">top3</div> </div> <div class="table_tr"> <div class="table_tile_bottom">bottom0</div> <div class="table_tile_bottom">bottom1</div> <div class="table_tile_bottom">bottom2</div> <div class="table_tile_bottom">bottom3</div> </div> 或者来个更简单的: 复制代码代码如下:<style> .float_left{ text-align:left; height: 20px; width: 25%; float: left; } </style> <div class ="float_left">asdasd</div> <div class ="float_left">asdasd</div> <div class ="float_left">why</div>

来源:爱蒂网