做動易模板時 我的圓角表格的做法(2)_動易Cms教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
body {
padding:10px;
font:76%/135% "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
}
/* CSS for the box starts here */
.box {
padding:0 12px 0 0;
background:#fff url(/help/UploadFiles_4256/200606/20060628151123420.gif) 100% 0 repeat-y;
}
.bi {
padding:0 0 0 12px;
background:#fff url(/help/UploadFiles_4256/200606/20060628151123420.gif) 0 0 repeat-y;
}
.bt {
height:17px;
margin:0 -12px;
background:url(/help/UploadFiles_4256/200606/20060628151133443.gif) 100% 0 no-repeat;
}
.bt div {
width:18px;
height:17px;
background:url(/help/UploadFiles_4256/200606/20060628151133443.gif) 0 0 no-repeat;
}
.bb {
height:17px;
margin:0 -12px;
background:url(/help/UploadFiles_4256/200606/20060628151133443.gif) 100% 100% no-repeat;
}
.bb div {
width:18px;
height:17px;
background:url(/help/UploadFiles_4256/200606/20060628151133443.gif) 0 100% no-repeat;
}
.box h1 {
margin:0;
padding:0.3em 10px;
background:#efece6;
font:bold 1.2em/1 Arial, Helvetica, sans-serif;
}
.box p, .box ul {
margin:0;
padding:4px 10px;
background:#fff;
}
.box li {
margin:0 0 0 2em;
padding:0;
}
〈/style〉
〈/head〉
〈body〉
〈div class="box"〉
〈div class="bi"〉
〈div class="bt"〉
〈div〉
〈/div〉
〈/div〉
〈h1〉Flexible box with custom corners and borders〈/h1〉
〈p〉This is a demo of a flexible box with custom corners and custom borders.
The box will expand to contain any amount of content vertically, will handle
any text size, and can become very wide before the horizontal borders start
breaking up. How wide depends on the width of one of the background images.〈/p〉
〈p〉Two images are used. 〈a href="box.gif"〉〈code〉box.gif〈/code〉〈/a〉 is a
complete box. For the sake of this demo I’ve made it 1600 pixels wide. It
is used for the corners and the horizontal borders. The other image,
〈a href="borders.gif"〉〈code〉borders.gif〈/code〉〈/a〉, contains the vertical
borders. Why use a single, large image for the corners instead of several
smaller ones? There are several reasons:〈/p〉
〈ul〉
〈li〉Splitting the image into a bunch (six in this case – one for each
corner plus the top and bottom borders) of smaller images may actually
increase the total file size, depending on the look of the corners and
borders.〈/li〉
〈li〉To minimize the number of HTTP requests sent to the server.〈/li〉
〈li〉Convenience. When changing the look of the borders and corners,
replacing two files is faster than replacing eight files.〈/li〉
〈/ul〉
〈p〉Some extra markup is needed to put the corners and borders in place.
A bit annoying, yes, but this extra, non-semantic XHTML is quite minimal,
and won’t get in the way if CSS is off, so I think I can live with it. It
is possible to get rid of some more markup by using the 〈code〉:before〈/code〉
and 〈code〉:after〈/code〉 pseudo-elements, but since Internet Explorer doesn’t
support them I’ll leave the extra markup in there.〈/p〉
〈p〉The main content area of this box can be filled with any elements you
like, as long as their background colour is set to white (or whatever colour
the inside of your box has), and their margins are zeroed. If the content
is transparent the left border will be doubled because the image used to
create it also contains the right border. You can avoid the need for that
by splitting the image in two, or adding an extra 〈code〉div〈/code〉 to put
all your content in.〈/p〉
〈div class="bb"〉
〈div〉
〈/div〉
〈/div〉
〈/div〉
〈/div〉
〈/body〉
〈/html〉
相關(guān)動易Cms教程:
- MAC錯誤的解決方法
- 如何屏蔽動易后臺導(dǎo)航里的某個功能菜單?
- 動易.NET版本留言自動選定欄目方法
- 動易SiteFactoty整合Discuz!NT3.0
- 在任意位置獲取根節(jié)點ID標(biāo)簽
- 如何開啟SiteWeaver6.8的支持,反對功能
- Windows 2008安裝動易.NET系統(tǒng)之四----動易系統(tǒng)安裝篇
- Windows 2008安裝動易.NET系統(tǒng)之三----數(shù)據(jù)庫篇
- Windows 2008安裝動易.NET系統(tǒng)之二----IIS、目錄環(huán)境配置篇
- 數(shù)據(jù)庫修復(fù),SQL Server 2005內(nèi)部操作不一致的處理
- 如何安裝動易.net程序權(quán)限配置
- 為什么提示對Windows系統(tǒng)文件夾下的Temp目錄沒有訪問權(quán)限?
動易Cms教程教程Rss訂閱Cms教程搜索
動易Cms教程推薦
- 解讀SiteFactory CMS 1.2升級到SiteFactory 2.0正式版操作步驟
- 解析調(diào)整制作欄目節(jié)點導(dǎo)航標(biāo)簽
- 為什么我設(shè)置用戶的按點數(shù)排行后,前臺顯示樣式不對?
- 模板方案導(dǎo)入到開源版6.5后首頁出現(xiàn)錯誤
- 滾動的公告字體鏈接顏色在哪里可以控制?
- 動易添加文章出現(xiàn):處理中的數(shù)據(jù)超過允許的極限(200K限制)
- 淺談模板引擎的進(jìn)一步優(yōu)化和完善
- 關(guān)于門戶網(wǎng)站首頁文字圖片大頭條插件
- 如何實現(xiàn)虎摘軍事網(wǎng)的圖文調(diào)用頁面切換特效效果?
- 出現(xiàn)HTTP/1.1 新建會話失敗,ASP程序不能運行的問題
- 相關(guān)鏈接:
- 教程說明:
動易Cms教程-做動易模板時 我的圓角表格的做法(2)
。