Skip to content

Commit fc1219d

Browse files
committed
💄 Make homepage banner responsive
1 parent 6332bee commit fc1219d

2 files changed

Lines changed: 47 additions & 5 deletions

File tree

‎homepage.html‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,33 @@
1515
<title>Liker Land 書店</title>
1616
<style>
1717
body {
18-
width: 100vw;
19-
height: 100vh;
20-
margin: 0;
21-
padding: 0;
18+
width: 100vw;
19+
height: 100vh;
20+
margin: 0;
21+
padding: 0;
2222
}
2323
a img {
2424
width: 100%;
2525
height: 100%;
2626
display: block;
2727
border: none;
2828
}
29+
a::after {
30+
pointer-events: none;
31+
content: '';
32+
position: absolute;
33+
top: 0;
34+
left: 0;
35+
right: 0;
36+
bottom: 0;
37+
transition-duration: 1500ms;
38+
transition: all .4s;
39+
}
40+
a:hover::after {
41+
background-color: rgba(0, 0, 0, 0.3);
42+
}
2943
img {
30-
object-fit: contain;
44+
object-fit: cover;
3145
}
3246
</style>
3347
</head>

‎index.html‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-Hant">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>法庭線 Ads Demo</title>
7+
</head>
8+
<body>
9+
<style>
10+
body {
11+
margin: 0;
12+
padding: 5px;
13+
}
14+
iframe {
15+
border: none;
16+
}
17+
</style>
18+
<h1>法庭線 Ads Demo</h1>
19+
<section>
20+
<h2><a href="homepage.html">Homepage</a></h2>
21+
<div style="position:relative;width:100%;max-width:570px;min-height:200px;"><iframe src="homepage.html" style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe></div>
22+
</section>
23+
<section style="max-width: 375px">
24+
<h2><a href="article.html">Article</a></h2>
25+
<div style="position:relative;width:100%;padding-top:75%"><iframe src="article.html" style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe></div>
26+
</section>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)