<!doctype html> <html> <head> <meta charset="utf-8"> <title>Ribbon实现</title> <style> /*以下样式只在chrome下最新版本做测试,未做兼容性处理*/ *{ margin:0; padding:0;} body{ background:#f4f4f4; font:12px/1.6 Georgia, "Times New Roman", Times, serif; color:#999; padding:20px 100px;}/*h2标签中3字下垂字体设置*/ .bubble{ margin:5px auto; width:350px; border-radius:10px; box-shadow:0px 0px 8px rgba(0,0,0,0.3); position:relative; z-index:90;} .rectangle{ background:#7f9db9; height:50px; width:380px; box-shadow:0px 0px 4px rgba(0,0,0,0.55); z-index:100; position:relative; left:-15px; top:30px;} .rectangle h2{ line-height:50px; font-size:30px; color:#fff; text-shadow:1px 1px 2px rgba(0,0,0,0.2); text-align:center;} .bubble:after{ content:''; border:15px solid #7d90a3; border-color:transparent #7d90a3 transparent transparent; height:0; width:0; position:absolute; left:-30px; top:65px; z-index:-1;} .bubble:before{ content:''; border:15px solid #7d90a3; border-color:transparent transparent transparent #7d90a3; height:0; width:0; position:absolute; right:-30px; top:65px;} /*对内容中的字体做修饰*/ .info{ padding:60px 25px 35px 25px;} .info h2{ font-size:20px;} .info p{ padding-top:10px; font-size:14px; line-height:22px;} .info p a{ color:#C63; text-decoration:none;} .info p a:hover{ text-decoration:underline;} </style> </head> <body> <div class="bubble"> <div class="rectangle"> <h2>3D CSS3 Ribbon</h2> </div> <div class="info"> <h2>I have used only css,friends!</h2> <p>For this tutorial,I have used some new properties.You can realize a nice 3D effect using only css.</p> <p><a href="#">Go to the tutorial!</a></p> </div> </div> </body> </html>
效果贴下代码在chrome最新的浏览器中运行下就可以看到了
相关推荐
自己的html5 css3练习 对于新手来说的有参考价值,老手勿下,内容页还是比较丰富。
css3 操作练习
本人经学习所编的可供新手学习的HTML5+css3,类似微博动态的网页,这里可供新手下载练习,里面包括了编写所需要的图片,具体详情参考How2j练习1
div css练习
HTML CSS学习练习HTML CSS学习练习HTML CSS学习练习 HTML CSS学习练习HTML CSS学习练习HTML CSS学习练习 HTML CSS学习练习HTML CSS学习练习HTML CSS学习练习 HTML CSS学习练习HTML CSS学习练习HTML CSS学习练习 ...
HTML5和CSS3编程从基础到应用 练习文件1-13章,清华出版
学习html和css的练习学习html和css的练习学习html和css的练习学习html和css的练习 学习html和css的练习学习html和css的练习学习html和css的练习学习html和css的练习 学习html和css的练习学习html和css的练习学习html...
学习HTML、CSS阶段练习学习HTML、CSS阶段练习学习HTML、CSS阶段练习 学习HTML、CSS阶段练习学习HTML、CSS阶段练习学习HTML、CSS阶段练习 学习HTML、CSS阶段练习学习HTML、CSS阶段练习学习HTML、CSS阶段练习 学习HTML...
NULL 博文链接:https://1185407601.iteye.com/blog/2285494
特雷西纳 CSS3练习
17-CSS3过渡练习.html
css练习下载
HTML CSS 初学的练习HTML CSS 初学的练习HTML CSS 初学的练习 HTML CSS 初学的练习HTML CSS 初学的练习HTML CSS 初学的练习 HTML CSS 初学的练习HTML CSS 初学的练习HTML CSS 初学的练习 HTML CSS 初学的练习...
HTML+CSS_练习作业_学成在线网站HTML+CSS_练习作业_学成在线网站 HTML+CSS_练习作业_学成在线网站HTML+CSS_练习作业_学成在线网站 HTML+CSS_练习作业_学成在线网站HTML+CSS_练习作业_学成在线网站 HTML+CSS_练习作业...
HTML5和CSS3课程HTML5和CSS3练习
HTML与css新手练习源码,常用的HTML5 和css3 适合新手练习
一个有关CSS学习的练习!一个有关CSS学习的练习!一个有关CSS学习的练习!一个有关CSS学习的练习!
Css边框练习源码
css3_proticecss3练习
很好的 CSS练习模板 PHP