第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

用CSS怎么寫出一個(gè)三角形

用CSS怎么寫出一個(gè)三角形

慕斯卡5910870 2016-07-27 14:20:53
查看完整描述

2 回答

?
葉0528

TA貢獻(xiàn)15條經(jīng)驗(yàn) 獲得超10個(gè)贊

效果:

http://img1.sycdn.imooc.com//57985da8000178a001670361.jpg

代碼:

<!DOCTYPE>

<html>

<head>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<title>三角形</title>

<style>

*{

?margin:0;padding:0;

}

/*向上*/

.triangle_border_up{

? ? width:0;

? ? height:0;

? ? border-width:0 30px 30px;

? ? border-style:solid;

? ? border-color:transparent transparent #333;/*透明 透明 ?灰*/

? ? margin:40px auto;

? ? position:relative;

}

.triangle_border_up span{

? ? display:block;

? ? width:0;

? ? height:0;

? ? border-width:0 28px 28px;

? ? border-style:solid;

? ? border-color:transparent transparent #fc0;/*透明 透明 ?黃*/

? ? position:absolute;

? ? top:1px;

? ? left:-28px;

}

/*向下*/

.triangle_border_down{

? ? width:0;

? ? height:0;

? ? border-width:30px 30px 0;

? ? border-style:solid;

? ? border-color:#333 transparent transparent;/*灰 透明 透明 */

? ? margin:40px auto;

? ? position:relative;

}

.triangle_border_down span{

? ? display:block;

? ? width:0;

? ? height:0;

? ? border-width:28px 28px 0;

? ? border-style:solid;

? ? border-color:#fc0 transparent transparent;/*黃 透明 透明 */

? ? position:absolute;

? ? top:-29px;

? ? left:-28px;

}

/*向左*/

.triangle_border_left{

? ? width:0;

? ? height:0;

? ? border-width:30px 30px 30px 0;

? ? border-style:solid;

? ? border-color:transparent #333 transparent transparent;/*透明 灰 透明 透明 */

? ? margin:40px auto;

? ? position:relative;

}

.triangle_border_left span{

? ? display:block;

? ? width:0;

? ? height:0;

? ? border-width:28px 28px 28px 0;

? ? border-style:solid;

? ? border-color:transparent #fc0 transparent transparent;/*透明 黃 透明 透明 */

? ? position:absolute;

? ? top:-28px;

? ? left:1px;

}

/*向右*/

.triangle_border_right{

? ? width:0;

? ? height:0;

? ? border-width:30px 0 30px 30px;

? ? border-style:solid;

? ? border-color:transparent transparent transparent #333;/*透明 透明 透明 灰*/

? ? margin:40px auto;

? ? position:relative;

}

.triangle_border_right span{

? ? display:block;

? ? width:0;

? ? height:0;

? ? border-width:28px 0 28px 28px;

? ? border-style:solid;

? ? border-color:transparent transparent transparent #fc0;/*透明 透明 透明 黃*/

? ? position:absolute;

? ? top:-28px;

? ? left:-29px;

}

</style>

</head>

<body>

<!-- 向上的三角形 -->

<div class="triangle_border_up">

? ? <span></span>

</div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

<!-- 向下的三角形 -->

<div class="triangle_border_down">

? ? <span></span>

</div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

<!-- 向左的三角形 -->

<div class="triangle_border_left">

? ? <span></span>

</div>

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

<!-- 向右的三角形 -->

<div class="triangle_border_right">

? ? <span></span>

</div>


</body>

</html>


查看完整回答
1 反對(duì) 回復(fù) 2016-07-27
  • 2 回答
  • 0 關(guān)注
  • 1622 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)