Lecturer: 土豆
Date: 2019/11/17
.btn-red {
display: inline-block;
background-color: rgb(200, 0, 0);
padding: 10px 30px;
color: white;
font-size: 20px;
border-radius: 5px;
border: none;
transition-duration: 100ms;
transition-timing-function: ease-in-out;
}
.btn-red:hover {
background-color: rgb(100, 0, 0);
}
<button class="btn-red">
I'm a button too
</button>
.btn-green {
display: inline-block;
background-color: rgb(0, 200, 0);
padding: 10px 30px;
color: white;
font-size: 20px;
border-radius: 5px;
border: none;
transition-duration: 100ms;
transition-timing-function: ease-in-out;
}
.btn-green:hover {
background-color: rgb(0, 100, 0);
}
.btn-yellow {
display: inline-block;
background-color: rgb(200, 200, 0);
padding: 10px 30px;
color: white;
font-size: 20px;
border-radius: 5px;
border: none;
transition-duration: 100ms;
transition-timing-function: ease-in-out;
}
.btn-green:hover {
background-color: rgb(100, 100, 0);
}
.btn-border {
display: inline-block;
padding: 10px 30px;
background-color: transparent;
color: black;
font-size: 20px;
border-radius: 5px;
border: 2px solid rgb(0, 0, 200);
transition-duration: 200ms;
transition-timing-function: ease-in-out;
}
.btn-border:hover {
color: white;
background-color: rgb(0, 0, 200);
}
<button class="btn-green">
I'm a button too too
</button>
<button class="btn-yellow">
I'm a button too too too
</button>
<button class="btn-border">
I'm a button too too too too
</button>
夠了喔,你當我這裡是吃到飽自助餐是不是
容器
內容
可以這樣裝
也可以這樣裝
.container h1 {
color: #00d;
}
<div class="container">
<h1>Hello!</h1>
</div>
.container .container-blue {
color: #00d;
}
.container .container-red {
color: #d00;
}
<div class="container">
<h1 class="container-blue">Hello!</h1>
<h1 class="container-red">Hello!</h1>
</div>
header .header-red {
color: #d00;
}
header .header-blue {
color: #00d;
}
footer .footer-red {
color: #d00;
}
footer .footer-blue {
color: #00d;
}
<header>
<h1 class="header-red">Hello!</h1>
<h1 class="header-blue">Hello!</h1>
</header>
<!-- ... -->
<footer>
<h1 class="footer-red">Hello1</h1>
<h1 class="footer-blue">Hello1</h1>
</footer>
又來個奧客啊!!!
容器: footer, header, div, navbar, sidebar...
內容: h3
想像一下老闆今天跟你說: 「耶,那個網頁藍色的部分全部換成咖啡色好不好?」
「好啊,當然好」
.btn-brown {
background-color: rgb(117, 52, 5);
color: white;
}
.btn-brown:hover {
background-color: rgb(80, 32, 0);
}
<button class="btn btn-brown">I'm a button</button>
/* ... */
header .header-brown {
color: #00d;
}
/* ... */
footer .footer-brown {
color: #00d;
}
<header>
<!-- ... -->
<h1 class="header-brown">Hello!</h1>
</header>
<div class="container">
<!-- ... -->
<h1 class="footer-brown">Hello1</h1>
</div>
<footer>
<!-- ... -->
<h1 class="footer-brown">Hello1</h1>
</footer>
老闆說: 「耶,那個網頁咖啡色好難看,全部改回藍色好不好?」
blue
primary
red
secondary
green
info
sidebar-right
sidebar
col-4