CSS圓角漸層背景框

來源:互聯網
上載者:User

最近項目中要頁面好看點, 我也不是美工, 整不出太好看的玩意啊, 隨便從網上找了段代碼修改了點, 放進去了, 呵呵, 不過還算過得去...

就是這個樣子啦, 當然, 框裡放了GridView, GridView弄出來的那些橫線.
個人感覺還蠻好看的, O(∩_∩)O哈哈~~~~
看代碼~:

Code
/*色彩坡形地區的樣式*/
.detailClass
{
    width: 608px;
    filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#E8F7F5', endColorStr='#FFFFFF', gradientType='0');
    border-left: solid 1px #8CCDD9;
    border-right: solid 1px #8CCDD9;
    padding-top: 8px;
    padding-bottom: 8px;
}

/*圓角的樣式*/
#xsnazzy p {margin:0 10px; letter-spacing:1px;}
#xsnazzy p {padding-bottom:0.5em;}
#xsnazzy {background: transparent; margin:1em; width: 610px; display: none;}

.xtop, .xbottom {display:block; background:transparent; font-size:1px;}
.xb1, .xb2, .xb3, .xb4 {display:block; overflow:hidden;}
.xb1, .xb2, .xb3 {height:1px;}
.xb2, .xb3, .xb4 {background:#E8F7F5; border-left:1px solid #8CCDD9; border-right:1px solid #8CCDD9;}
.xb1 {margin:0 5px; background:#8CCDD9;}
.xb2 {margin:0 3px; border-width:0 2px;}
.xb3 {margin:0 2px;}
.xb4 {height:2px; margin:0 1px;}

.xb2, .xb3 {filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FFFFFF', endColorStr='#E8F7F5', gradientType='0');}

.yb1, .yb2, .yb3, .yb4 {display:block; overflow:hidden;}
.yb1, .yb2, .yb3 {height:1px;}
.yb2, .yb3, .yb4 {background:#fff; border-left:1px solid #8CCDD9; border-right:1px solid #8CCDD9;}
.yb1 {margin:0 5px; background:#8CCDD9;}
.yb2 {margin:0 3px; border-width:0 2px;}
.yb3 {margin:0 2px;}
.yb4 {height:2px; margin:0 1px;}

.yb2, .yb3 {filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#E8F7F5', endColorStr='#FFFFFF', gradientType='0');}

應用時需要像下面這樣:Code
<div id="xsnazzy" runat="server">
        <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
                    <div id="divUpLink" class="detailClass">
                            在這裡放上此地區要顯示的東西嘍~
                    </div>
        <b class="xbottom"><b class="yb4"></b><b class="yb3"></b><b class="yb2"></b><b class="yb1"></b></b>
</div>

Very Good!
/*------- 完 -------*/

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.