網路城邦
上一篇 回創作列表 下一篇   字體:
CSS語法:商品簡介與連結Banner
2015/03/24 18:34:30瀏覽97|回應0|推薦0

<style type="text/css">

div{

                width: 40%;

        text-align: center;

}

*{             /*所有元素*/

        margin:0;

        line-height:1.2em;

}

a p:first-child{       /*a裡的P的第一元素*/

        color: #F00;

        }

a p:last-child{        /*a裡的P的最後元素*/

        color:#F00;

        }

.price:before{        /*類別price前的元素*/

        content: "網路價 $";

        font-size: 8px;

        color: #00F;

        margin: 0px;

}

 

.price:after{          /*類別price後的元素*/

        content: "搶購";

        color: #00F;

        text-decoration: underline;

        text-align: center;

}

       

a:link {

        text-decoration: none;

}

a img {

        border: none;

}

a:visited {

        text-decoration: none;

}

a:hover {

        text-decoration: none;

}

a:active {

        text-decoration: none;

}

</style>

</head>

 

<body>

<div> <a href="#"><img src="sDSAB03-A9005O0GY000_54604606a6e01.jpg" width="120" height="120" /></a>

  <a href="#">

  <p>大尺寸超值熱銷推薦</p>

  <p>ASUS VS278N 27LED寬螢幕</p>

  <p>支援 D-sub / DVI-D</p>

  <P class="price">5988</p>

  </a>

</div>

</body>

( 知識學習隨堂筆記 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=dereklintw&aid=21738331