纯CSS3实现彩色缎带效果
2015-06-03 14:06
489 查看
<!DOCTYPE HTML>
<html>
<head>
<title>纯CSS3缎带效果</title>
<style type="text/css">
.ribbon-content{border: 1px solid #DDD;font-weight: bold;margin: 0 -10px;min-height: 30px;padding: 7px 31px;text-align: center;line-height: 30px;}
.ribbon-left{display: block;border-left: 10px solid white;border-top: 8px solid #EEE;float: left;height: 0;margin-left: -10px;width: 0;}
.ribbon-right{display: block;border-right: 10px solid white;border-top: 8px solid #EEE;float: right;height: 0;margin-right: -10px;width: 0;}
</style>
</head>
<body>
<div><A href="http://www.999jiujiu.com/">http://www.999jiujiu.com/</A></div>
<div style="margin: 0 auto; width: 200px;">
<div class="ribbon" style="background: whiteSmoke;">
<div class="ribbon-content" style="background: whiteSmoke;">标题</div>
<div class="ribbon-left"></div>
<div class="ribbon-right"></div>
</div>
<div style="background: whiteSmoke;">内容显示区:这像不像一个彩缎的头部?<br>内容显示区内容显示区内容显示区内容显示区内容显示区内容显示区内容显示区</div>
</div>
</body>
</html>
<html>
<head>
<title>纯CSS3缎带效果</title>
<style type="text/css">
.ribbon-content{border: 1px solid #DDD;font-weight: bold;margin: 0 -10px;min-height: 30px;padding: 7px 31px;text-align: center;line-height: 30px;}
.ribbon-left{display: block;border-left: 10px solid white;border-top: 8px solid #EEE;float: left;height: 0;margin-left: -10px;width: 0;}
.ribbon-right{display: block;border-right: 10px solid white;border-top: 8px solid #EEE;float: right;height: 0;margin-right: -10px;width: 0;}
</style>
</head>
<body>
<div><A href="http://www.999jiujiu.com/">http://www.999jiujiu.com/</A></div>
<div style="margin: 0 auto; width: 200px;">
<div class="ribbon" style="background: whiteSmoke;">
<div class="ribbon-content" style="background: whiteSmoke;">标题</div>
<div class="ribbon-left"></div>
<div class="ribbon-right"></div>
</div>
<div style="background: whiteSmoke;">内容显示区:这像不像一个彩缎的头部?<br>内容显示区内容显示区内容显示区内容显示区内容显示区内容显示区内容显示区</div>
</div>
</body>
</html>
相关文章推荐
- css全局样式表
- CSS3的REM设置字体大小
- HTML/CSS学习笔记
- web开发常用样式
- js中设置css属性
- div紧贴浏览器底部CSS
- css position 属性 (absolute 和fixed 区别)
- css盒模型
- CSS实现DIV三角形
- CSS初始化代码
- CSS hack技巧
- CSS实现div居中
- css盒子模型
- CSS固定顶底之二(肯定有效)
- 设置webstorm的file watch 监视scss文件
- 【从0到1学Web前端】CSS伪类和伪元素
- 【从0到1学Web前端】CSS伪类和伪元素
- 【从0到1学Web前端】CSS伪类和伪元素 分类: HTML+CSS 2015-06-02 22:29 1065人阅读 评论(0) 收藏
- checkbox 设定文字和选框之间的距离及自定义样式
- 002_01CSS