Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
body{
background-color: gray;
margin: 0 auto;
}
.center{
margin: 0 auto;
padding: 0 0 0 0;

}
#all{
height: 600px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊其實可以不用設置height哦!因為高度是隨著裡面包的元素自動疊下去的~

width: 800px;
background: white;
}
#head{
height: 200px;
background: red;
}
#menu{
height: 70px;
background: rgb(184, 158, 76);
}
#Content{
height: 330px;
background: white;
position: relative;
}
footer{
height: 20pt;
width: 800px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊用 width: 100%; 就好~以增加程式碼維護性

background:rgb(70, 69, 69);
}
img{
width: 800px;
height: 200px;
}
ul li{
display: inline-block;
list-style: none;
padding: 0 20px;
font-size: 15pt;
}
ul{
margin: 0;
padding: 0;
text-align: center;
}
.blank{
height: 65%;
}
a:link{
color: black;
text-decoration-line: none;
}
.title{
line-height: 50pt;
display: block;
font-size: 20pt;
font-weight: bolder;
text-align: center;
}
table{
height: 40%;
width: 85%;
margin-left: auto;
margin-right: auto;
}
button{
padding: 0;
background-color: gray;
color: white;
line-height: 30pt;
border: none;
width: 80pt;
position: absolute;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡不需要使用到

position: absolute;
left: 50%;
transform: translateX(-50%);

要置中按鈕就在外面包覆的div加上 text-align: center;哦~

left: 50%;
transform: translateX(-50%);
}
footer{
text-align: center;
position: relative;
}
footer span{
position: absolute;
top: 20%;
transform: translate(-50%);
}
58 changes: 58 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title>Kaykaihomework</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet">
</head>

<body>
<div id=all class="center">
<div id="head" class="center">
<img src="assets/image.png" />
</div>
<div id="menu">
<div class="blank">

</div>
<ul>
<li>
<a href="#">HOME</a>
</li>
<li>
<a href="#">STORY</a>
</li>
<li>
<a href="#">POEM</a>
</li>
<li>
<a href="#">ABOUT</a>
</li>
</ul>
</div>
<div id="Content">
<div class="title">
醉到車停待轉區 拒酒測還嗆警
</div>
<table>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡不需要使用到table哦~用<p>之類的標籤即可!

<tr>
<td>
宜蘭縣新月廣場今天上午6點盧姓男子去酒吧喝完酒,直接將車停在中山路轉舊城南路的待轉區上睡覺,警方接獲民眾檢舉前往現場處理,盧男見狀將車往前移 動,員警立即把男子拉下車,並要實施酒測,但盧男 不但拒測,還將攔查過程直播上網,並大聲咆嘯,質 疑警方沒辦法證明他酒駕;由於盧男拒測,員警依法開罰9萬元,車子也被拖吊保管。今天上午6點,盧姓男子在酒吧喝完酒後,將車中山路轉舊城南路的待轉區上睡覺,遭到民眾檢舉,員警到場處理,發現盧男在車上呼呼大睡,敲門要求他移車,盧男將車發動後,往前開了一小段,警方立即要求他下車,但盧不從,員警就將人給拉下車。由於滿身酒氣的盧男將車停在車道上,還發動引擎,員警到場又移了車,有駕駛行為,警方認為這就算酒駕,
要求盧男實施酒測,但遭到拒絕,盧還憤而將警方攔檢過程上網直播,質問員警「我哪裡在酒駕」、「車往前移動關我屁事」、「車就停在這可以嗎」等語,還說「有駕駛行為就拿出來,到法院再來講」、「警察要引導我酒駕,是什麼意思」。
</td>
</tr>

</table>
<div class="center">
<button>READ MORE</button>
</div>
</div>
</div>
</body>
<footer class="center">
<span>Copyright © KAYKAI ALL RIGHTS PESERVED</span>
</footer>

</html>