質問編集履歴
1
HTML, CSSを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -67,3 +67,57 @@
|
|
67
67
|
}
|
68
68
|
|
69
69
|
```
|
70
|
+
|
71
|
+
HTML
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
<div class="fixed_nav">
|
76
|
+
|
77
|
+
<ul>
|
78
|
+
|
79
|
+
<li><a href="#">メニュー1</a></li>
|
80
|
+
|
81
|
+
<li><a href="#">メニュー2</a>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
CSS
|
90
|
+
|
91
|
+
```
|
92
|
+
|
93
|
+
.fixed_nav {
|
94
|
+
|
95
|
+
position: fixed !important;
|
96
|
+
|
97
|
+
width: 100%;
|
98
|
+
|
99
|
+
-webkit-transition: all 0.5s;
|
100
|
+
|
101
|
+
transition: all 0.5s;
|
102
|
+
|
103
|
+
z-index: 999;
|
104
|
+
|
105
|
+
top:0px;
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
.fixed_nav.js_hide {
|
110
|
+
|
111
|
+
transform: translateY(-100%);
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
.fixed_nav.js_hide2 {
|
118
|
+
|
119
|
+
transform: translateY(0);
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
```
|