简单css圆角矩形
时间:2011-01-22
来源:互联网
转发一个圆角边框的,高手漂过。有点像腾讯微博的对话效果,网上很多评论也是这么做好的,我觉得这个突出的小三角用得很聪明。
复制内容到剪贴板
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>css 圆角矩形</title>
<style type="text/css">
b{display:block;height:1px;overflow:hidden;background:#f6f6f6}
.top1{width:294px;background:#ccc;margin:0 4px;}
.top2{width:294px;border-left:1px solid #ccc;border-right:1px solid #ccc;margin:0 3px;}
.top3{width:296px;border:1px solid #ccc;border-bottom:none;border-top:none;margin:0 2px;}
.top4{width:298px;border:1px solid #ccc;border-top:none;border-bottom:none;margin:0 1px;height:2px;}
.text_box{position:relative;width:300px;height:100px;border:1px solid #ccc;border-top:none;border-bottom:none;background:#f6f6f6}
.sa-bg{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-8px;color:#ddd}
.sa{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-6px;color:#f6f6f6}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
</head>
<body>
<b class="top1"></b>
<b class="top2"></b>
<b class="top3"></b>
<b class="top4"></b>
<div class="text_box">
<span class="sa-bg">◆</span><span class="sa">◆</span>
there is your content
</div>
<b class="top4"></b>
<b class="top3"></b>
<b class="top2"></b>
<b class="top1"></b>
</body>
</html>
代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>css 圆角矩形</title>
<style type="text/css">
b{display:block;height:1px;overflow:hidden;background:#f6f6f6}
.top1{width:294px;background:#ccc;margin:0 4px;}
.top2{width:294px;border-left:1px solid #ccc;border-right:1px solid #ccc;margin:0 3px;}
.top3{width:296px;border:1px solid #ccc;border-bottom:none;border-top:none;margin:0 2px;}
.top4{width:298px;border:1px solid #ccc;border-top:none;border-bottom:none;margin:0 1px;height:2px;}
.text_box{position:relative;width:300px;height:100px;border:1px solid #ccc;border-top:none;border-bottom:none;background:#f6f6f6}
.sa-bg{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-8px;color:#ddd}
.sa{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-6px;color:#f6f6f6}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
</head>
<body>
<b class="top1"></b>
<b class="top2"></b>
<b class="top3"></b>
<b class="top4"></b>
<div class="text_box">
<span class="sa-bg">◆</span><span class="sa">◆</span>
there is your content
</div>
<b class="top4"></b>
<b class="top3"></b>
<b class="top2"></b>
<b class="top1"></b>
</body>
</html>
作者: tydgb 发布时间: 2011-01-22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>css 圆角矩形</title> <style type="text/css"> b{display:block;height:1px;overflow:hidden;background:#f6f6f6} .top1{width:294px;background:#ccc;margin:0 4px;} .top2{width:294px;border-left:1px solid #ccc;border-right:1px solid #ccc;margin:0 3px;} .top3{width:296px;border:1px solid #ccc;border-bottom:none;border-top:none;margin:0 2px;} .top4{width:298px;border:1px solid #ccc;border-top:none;border-bottom:none;margin:0 1px;height:2px;} .text_box{position:relative;width:300px;height:100px;border:1px solid #ccc;border-top:none;border-bottom:none;background:#f6f6f6} .sa-bg{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-8px;color:#ddd} .sa{display:block;overflow:hidden;width:16px;height:16px;position:absolute;top:50px;left:-6px;color:#f6f6f6} </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-cn" /> </head> <body> <b class="top1"></b> <b class="top2"></b> <b class="top3"></b> <b class="top4"></b> <div class="text_box"> <span class="sa-bg">◆</span><span class="sa">◆</span> there is your content </div> <b class="top4"></b> <b class="top3"></b> <b class="top2"></b> <b class="top1"></b> </body> </html>
提示:您可以先修改部分代码再运行
看看。提示:您可以先修改部分代码再运行
右下角好像很不自然。
作者: yamanyin 发布时间: 2011-01-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28