您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

巧用css代码打造圆角table

2024/3/26 18:05:23发布34次查看
我们都知道css是一种层叠样式表(英文全称:cascading style sheets),是一种用来表现html(标准通用标记语言的一个应用)或xml(标准通用标记语言的一个子集)等文件样式的计算机语言。css不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。
那么今天就教大家一个小的技巧用css代码打造圆角table,当然也可以制造圆角div。
效果如下图:
<html xmlns="http://www.phpernote.com"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>css打造圆角table</title> <style type="text/css"> div.roundedcorner{background:#9bd1fa;width:260px;} b.rtop, b.rbottom{display:block;background:#fff} b.rtop b, b.rbottom b{display:block;height:1px;overflow:hidden; background:#9bd1fa} b.r1{margin:0 5px} b.r2{margin:0 3px} b.r3{margin:0 2px} b.rtop b.r4, b.rbottom b.r4{margin:0 1px;height:2px} </style> </head> <body> <div class="roundedcorner"> <b class="rtop"> <b class="r1"></b> <b class="r2"></b> <b class="r3"></b> <b class="r4"></b> </b> <table style="width:100%;height:100px;"> <tr> <td>单元格1</td> <td>phpernote.com</td> </tr> <tr> <td>单元格3</td> <td>单元格4</td> </tr> </table> <b class="rbottom"> <b class="r4"></b> <b class="r3"></b> <b class="r2"></b> <b class="r1"></b> </b> </div> </body> </html>
css 能够对网页中元素位置的排版进行像素级精确控制,支持几乎所有的字体字号样式,拥有对网页对象和模型样式编辑的能力。不管是学习前端还是后端我们都需要掌握基本的css知识,以上关于css打造圆角table的小教程希望对大家有帮助。
相关推荐:
css3简单图形绘制教程
css如何实现文字颜色渐变的实例
如何使用css实现圆周运动小球的实例
以上就是巧用css代码打造圆角table的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product