最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

html5锥形,html – 使用CSS的锥形div

IT培训 admin 1浏览 0评论

html5锥形,html – 使用CSS的锥形div

can be achieved与

transparent border!

CSS

#test1 {

border-top: 100px solid red;

border-bottom: 100px solid red;

border-right: 100px solid transparent;

width: 300px;

}

#test2 {

border-top: 100px solid red;

border-right: 50px solid transparent;

height: 0;

width: 100px;

}

#test3 {

border-top: 100px solid red;

border-right: 50px solid transparent;

height: 100px;

width: 100px;

content: 'ds';

z-index: -1; /* make it the background */

}

#test3 .content {

position: relative;

top: -100px;

margin: 5px;

float: left; /* wrap the text */

clear: left; /* for demo */

font-size: 1em;

background-color: cyan;

}

HTML

Watch for the

new lines.

Do not overlap.

html5锥形,html – 使用CSS的锥形div

can be achieved与

transparent border!

CSS

#test1 {

border-top: 100px solid red;

border-bottom: 100px solid red;

border-right: 100px solid transparent;

width: 300px;

}

#test2 {

border-top: 100px solid red;

border-right: 50px solid transparent;

height: 0;

width: 100px;

}

#test3 {

border-top: 100px solid red;

border-right: 50px solid transparent;

height: 100px;

width: 100px;

content: 'ds';

z-index: -1; /* make it the background */

}

#test3 .content {

position: relative;

top: -100px;

margin: 5px;

float: left; /* wrap the text */

clear: left; /* for demo */

font-size: 1em;

background-color: cyan;

}

HTML

Watch for the

new lines.

Do not overlap.

发布评论

评论列表 (0)

  1. 暂无评论