iT邦幫忙

0

css聖誕樹問題??

css
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//en" "http://www.w3. org/TR/html4/strict.dtd">

    <meta name="content-type" content="text/html; charset=utf-8">
    <title>圣??</title>
    <style>
        #content{
            height:680px;
            background:black;
        }
/*??*/        
        .tri{
            width:0px;
            height:0px;
            border-style:solid;
            border-width:50px;
            border-top-width:0px;
            border-color:green transparent;
            margin:auto;
        }
        .tri1{
            border-width:50px;
            border-top-width:0px;
        }
        .tri2{
            border-width:100px;
            border-top-width:0px;
        }        
        .tri3{
            border-width:150px;
            border-top-width:0px;
        }
/*?干*/
        #rectangle{
            width:90px;
            height:150px;
            background:#CC9900;
            margin:auto;
        }
    </style>


    <div id="content">
        <div class="tri tri1"></div>
        <div class="tri tri2"></div>
        <div class="tri tri3"></div>
        <div id="rectangle"></div>
    </div>

我在做一個聖誕樹
想請問一下, border-style:solid; ← 這行一定要加嗎? 可解釋一下他的用意嗎~~
搞不太懂 ~~~ 3q~~

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

2
炎之虛空
iT邦高手 3 級 ‧ 2015-01-29 21:22:23
最佳解答
fillano iT邦超人 1 級 ‧ 2015-01-30 11:11:08 檢舉

可以自己實驗看看:http://jsfiddle.net/gz6uoscn/

我要發表回答

立即登入回答