質問編集履歴
1
html scss 追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,6 +10,168 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
### 該当のソースコード
|
13
|
+
```html
|
14
|
+
|
15
|
+
<!DOCTYPE html>
|
16
|
+
<html lang="ja">
|
17
|
+
|
18
|
+
<head>
|
19
|
+
<meta charset="UTF-8">
|
20
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
21
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
22
|
+
<title>Document</title>
|
23
|
+
|
24
|
+
<link rel="favicon" href="/favicon.ico">
|
25
|
+
|
26
|
+
|
27
|
+
<!-- reset css -->
|
28
|
+
<link rel="stylesheet" href="/css/reset.css">
|
29
|
+
<!-- font awesome -->
|
30
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
|
31
|
+
|
32
|
+
<!-- drawer.css -->
|
33
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/drawer/3.2.2/css/drawer.min.css"
|
34
|
+
media="screen and (max-width:767px)">
|
35
|
+
<!-- jquery & iScroll -->
|
36
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
37
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/iScroll/5.2.0/iscroll.min.js"></script>
|
38
|
+
<!-- drawer.js -->
|
39
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/drawer/3.2.2/js/drawer.min.js"></script>
|
40
|
+
|
41
|
+
<!-- google font -->
|
42
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
43
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
44
|
+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP&family=Satisfy&display=swap" rel="stylesheet">
|
45
|
+
|
46
|
+
<link rel="stylesheet" href="https://use.typekit.net/qph3iir.css">
|
47
|
+
<!-- swiper -->
|
48
|
+
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
|
49
|
+
|
50
|
+
<!-- original -->
|
51
|
+
<link rel="stylesheet" href="/css/style.css">
|
52
|
+
<script src="/js/script.js"></script>
|
53
|
+
</head>
|
54
|
+
|
55
|
+
<body>
|
56
|
+
<header class="header">
|
57
|
+
<section class="header">
|
58
|
+
<div class="header-container">
|
59
|
+
|
60
|
+
<div class="header-flex">
|
61
|
+
<a href="" class="header-container-img">
|
62
|
+
<img src="/img/logo_header.png" alt="">
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<nav class="header-nav">
|
66
|
+
<ul class="header-ul">
|
67
|
+
<li class="header-li">
|
68
|
+
<a href="#about" >About</a>
|
69
|
+
</li>
|
70
|
+
<li class="header-li">
|
71
|
+
<a href="#menu">Menu</a>
|
72
|
+
</li>
|
73
|
+
<li class="header-li">
|
74
|
+
<a href="#shop">Shop</a>
|
75
|
+
</li>
|
76
|
+
<li class="header-li">
|
77
|
+
<a href="#contact">Contact</a>
|
78
|
+
</li>
|
79
|
+
</ul>
|
80
|
+
</nav>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</section>
|
85
|
+
|
86
|
+
</header>
|
87
|
+
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
```scss
|
92
|
+
|
93
|
+
|
94
|
+
.header {
|
95
|
+
position: fixed;
|
96
|
+
width: 100%;
|
97
|
+
z-index: 1000;
|
98
|
+
}
|
99
|
+
|
100
|
+
.header-container {
|
101
|
+
background-color: #2F2F2F;
|
102
|
+
padding-left: 31px;
|
103
|
+
padding-right: 70px;
|
104
|
+
|
105
|
+
@include mq(sp) {
|
106
|
+
padding-left: 18px;
|
107
|
+
padding-right: 16px;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
.header-container-img {
|
112
|
+
@include mq(sp) {
|
113
|
+
width: 14.4%;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
.header-flex {
|
118
|
+
display: flex;
|
119
|
+
align-items: center;
|
120
|
+
justify-content: space-between;
|
121
|
+
padding: 20px 0;
|
122
|
+
}
|
123
|
+
|
124
|
+
.header-ul {
|
125
|
+
display: flex;
|
126
|
+
}
|
127
|
+
|
128
|
+
.header-li {
|
129
|
+
font-size: 1.8rem;
|
130
|
+
line-height: calc(21.6/18);
|
131
|
+
letter-spacing: 0.03em;
|
132
|
+
color: #fff;
|
133
|
+
font-family: 'reross-quadratic', sans-serif;
|
134
|
+
position: relative;
|
135
|
+
|
136
|
+
&::before {
|
137
|
+
position: absolute;
|
138
|
+
bottom: -3px;
|
139
|
+
left: 0;
|
140
|
+
content: '';
|
141
|
+
width: 0;
|
142
|
+
height: 2px;
|
143
|
+
background-color: #F2F4F1;
|
144
|
+
transition: .3s;
|
145
|
+
}
|
146
|
+
|
147
|
+
&:hover::before {
|
148
|
+
width: 100%;
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
&:not(:first-child) {
|
153
|
+
margin-left: 40px;
|
154
|
+
|
155
|
+
@include mq(sp) {
|
156
|
+
margin-left: 20px;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
@include mq(sp) {
|
161
|
+
font-size: 1.4rem;
|
162
|
+
line-height: calc(16.8/14);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
.header-li.active {
|
167
|
+
color: red;
|
168
|
+
// width: 100%;
|
169
|
+
// border-bottom: 2px solid #000;
|
170
|
+
// background-color: #F2F4F1;
|
171
|
+
}
|
172
|
+
```
|
173
|
+
|
174
|
+
|
13
175
|
|
14
176
|
```jquery
|
15
177
|
①
|