
- css3๋ก ์ด์ ๋ผ์ด๋ ๊ทธ๋ผ๋์ธํธ ๋ฒํผ์ ๋ง๋ค ์ ์๋ค. ๊ทธ๋ฆฌ๊ณ ๊ฐ๋ฒผ์ด css์ฝ๋๋ก ์ด๋ฏธ์ง์์ค์ผ๋ก ๋ฒํผ์ ๋ง๋ค ์ ์๋ค.
- 1์ฐจ ์ถ์ฒ์ฌ์ดํธ : Web Designer Wall
2์ฐจ ์ถ์ฒ์ฌ์ดํธ : PremiumXE
- ๋ค๋ง, ์ต์คํ๋ก๋ฌ8์์๋ ๋ผ์ด๋๊ฐ ๋จนํ์ง์ง ์๋๋ค. ie6์์๋ ์ ๋นํ ํ์๋ ๊ฑฐ๊ฐ์ ๋ณด์ธ๋ค.
- ๋ชจ๋ฐ์ผํ์ด์ง์์๋ ๋ฒํผ์ด ์ด์๊ฒ ๋์จ๋ค. ์์์ค๋ ํ๊ธ์ผ๋๋ ์ ๋๋ก ๋์ค์ง ์์ง๋ง ์คํ์ผ์ํธ๋ฅผ ๊ณ ์น๋ฉด ๊ด์ฐฎ๊ฒ ๋์ฌ ์ ์์๋ฏํ๋ค.
- ๋ฐ๋ชจํ์ด์ง : Demo: CSS3 Buttons
Base
.button {
display: inline-block;
outline: none;
cursor: pointer;
text-align: center;
text-decoration: none;
font: 14px/100% Arial, Helvetica, sans-serif;
padding: .5em 2em .55em;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.button:hover {
text-decoration: none;
}
.button:active {
position: relative;
top: 1px;
}
Size
.big-rounded {
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
.medium {
font-size: 12px;
padding: .4em 1.5em .42em;
}
.small {
font-size: 11px;
padding: .2em 1em .275em;
}
Color
.orange {
color: #fef4e9;
border: solid 1px #da7c0c;
background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
background: -moz-linear-gradient(top, #faa51a, #f47a20);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
}
.orange:hover {
background: #f47c20;
background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));
background: -moz-linear-gradient(top, #f88e11, #f06015);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');
}
.orange:active {
color: #fcd3a5;
background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));
background: -moz-linear-gradient(top, #f47a20, #faa51a);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');
}
html์ฝ๋์ฝ์
- css๋ฒํผ์ ์ฉ์ class๋ฅผ ์ฌ์ฉํ๋ค. ์๋์ ๊ฐ์ ํํ๋ก css๋ฅผ ํธ์ถํ๋ค.
<a href="#" class="button small orange">Button</a>
- ์์๋ ์๊ด์์ด [class="๋ฒํผ ์๊น"] ํํ๋ก class์ ๊ฐ์ ๋ฃ์ด์ฃผ๋ฉด ๋๋ค.
- aํ๊ทธ๋ฟ๋ง์๋๋ผ div,p,input๊ฐ์ ๋๋ถ๋ถ์ ํ๊ทธ์์ ์ฌ์ฉํ ์ ์๋ค. ๊ทธ๋ฆฌ๊ณ ๋ฒํผ์ ์์ฑ์ ์ธ๋ผ์ธ์ธ๋ฏํ๋ค.
- ๋ค์ํ ์ปฌ๋ฌ์ css์ฝ๋๋ Demo: CSS3 Buttons์์ ์์ค ์ด๋ํด๋ณด๋ฉด ๋๋ค.
- ๋ฒํผ์ ์ปฌ๋ฌ๋ ์ฝ๊ฒ ์์ ํ ์ ์์ผ๋ฉฐ, ์ปฌ๋ฌ ์์ ์ ๊ดํ ์ ํํ ๋ด์ฉ์ Web Designer Wall์์ ํ์ธํ ์ ์๋ค.
0๊ฐ์ ๋๊ธ
๋ฑ๋ก๋ ๋๊ธ์ด ์์ต๋๋ค.