顯示包含「css」標籤的文章。顯示所有文章
顯示包含「css」標籤的文章。顯示所有文章

CSS ~ set height 100%

html {
height: 100%;
}


body {
margin: 0;
padding: 0;
height: 100%;
}


#content {
background: #EEE;
border-left: 1px solid #000;
border-right: 1px solid #000;
padding: 0 20px 0 20px;
margin: auto;
font: 1.5em arial, verdana, sans-serif;
width: 960px;
min-height: 100%;
}



reference
http://www.tutwow.com/htmlcss/quick-tip-css-100-height/

CSS ~ nth child

table.list tr td:first-child{
width:50%;

}
table.list tr td:nth-child(2){
width:20%;

}
table.list tr td:nth-child(3){
width:10%;

}
table.list tr td:nth-child(4){
width:20%;
}

http://www.w3.org/TR/css3-selectors/

CSS ~ background-position

background-position: x y;


div{
background-position:0px 3px;
}

http://www.lll.hawaii.edu/web/workshop/css/css-example.html

CSS ~ rgba example


div.qqq{
background-color:rgb(0,0,255);opacity:0.5;
}
qqqqqqqqqqqqqqqqq
xxxxxxxxxxxxxxxxxxxxxxx

div.qqq2{
background-color:rgba(0,0,255,0.5);
}
qqqqqqqqqqqqqqqqq
xxxxxxxxxxxxxxxxxxxxxxx

http://www.css3.info/introduction-opacity-rgba/

CSS Sprites ~ 網頁圓角製作

想當年作網頁的圓角時.........

是用一個叫Nifty Corners的東西
http://www.html.it/articoli/nifty/index.html

他的作法是把div一層一層疊上讓他看起來像圓角的樣子~

還蠻酷的~~~~~

可是他的code...............小亂= ="


但看了這個方法~~~~我覺得更酷XD
http://www.wowbox.com.tw/blog/article.asp?id=3311

他的作法更酷~~~~而且程式碼更簡潔有力~~~~又好寫~~~~

大概就是一個div包住~~~~裡面直接貼內容~~~~

然後用position的屬性作4個div黏在4個角落

而他的背景圖片都只用到一張圖................ 配background-position的屬性去抓圖片的位置

所以弄出來就是一個有圓角的框 ~~~~可是都只用到同一張圖~~

我覺得超神奇的@0@


要感謝宅男友人分享~XD

CSS 版面置中語法

我之前都不知道原來只要用auto的語法就可以置中說@@

都用div align="center"的方法~~~~把整個版面包住....

其實只要把你的整個版面的div給他這段語法就可了~~

margin:auto;

他就會自動置中了XD

至於我包住整版面的div~~~~通常class都叫wrapper

然後只要在css檔裡面下

div.wrapper
{
margin:auto;
}

[CSS]Div with Scroll bar

Example #1-Create a div with both vertical and horizontal scroll bars:

<div style=”width:300px;height:100px;overflow:auto;”>some text</div>

Example #2-Create a div with either vertical or horizontal scroll bars but not both:

<div style=”width:300px;height:100px;overflow-x: hidden;overflow-y:scroll;overflow:-moz-scrollbars-vertical !important;”>some text</div>

Example #3-you want to have div with only horizontal scroll bars, you can write like this

<div style=”overflow-x:scroll ;overflow-y:hidden;overflow:-moz-scrollbars-horizontal !important;”>some text</div>

http://chrisbalboa.wordpress.com/2007/07/06/cssdiv-with-scroll-bar/

IE 與 FireFox 的透明樣式語法

IE
.xxx{
filter:Alpha(opacity=50);
}

FireFox
.xxx{
opacity:0.5;
}