質問編集履歴
1
css追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,30 +2,22 @@
|
|
2
2
|
<!DOCTYPE html>
|
3
3
|
<html lang="ja">
|
4
4
|
<head>
|
5
|
-
<!-- Required meta tags -->
|
6
5
|
<meta charset="utf-8">
|
7
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
8
7
|
|
9
|
-
<
|
10
|
-
<link rel="stylesheet" href="
|
11
|
-
|
12
|
-
<link rel="stylesheet" href="css/stylesheet2.css">
|
13
|
-
<link rel="stylesheet" href="css/megam.css">
|
14
|
-
<!--<link rel="stylesheet" href="css/acordion.css"> -->
|
15
|
-
<link rel="preconnect" href="https://fonts.gstatic.com">
|
8
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
9
|
+
<link rel="stylesheet" href="/css/mmenu.css">
|
10
|
+
|
16
11
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
17
12
|
<link href="https://fonts.googleapis.com/css2?family=Anton&family=M+PLUS+1p&display=swap" rel="stylesheet">
|
18
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
19
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
|
20
|
-
<
|
13
|
+
<link href="https://fonts.googleapis.com/css?family=M+PLUS+1p" rel="stylesheet">
|
21
14
|
<title></title>
|
22
|
-
|
23
|
-
|
24
15
|
</head>
|
25
16
|
<body>
|
26
17
|
|
27
|
-
|
28
18
|
<div class="navbar">
|
19
|
+
<a href="#home">Home</a>
|
20
|
+
<a href="#news">News</a>
|
29
21
|
<div class="dropdown">
|
30
22
|
<button class="dropbtn">Dropdown
|
31
23
|
<i class="fa fa-caret-down"></i>
|
@@ -57,23 +49,107 @@
|
|
57
49
|
</div>
|
58
50
|
</div>
|
59
51
|
</div>
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
66
|
-
<script src="/js/dropdown.js"></script>
|
67
|
-
<script src="/js/acordion.js"></script>
|
68
|
-
<script src="/js/contact.js"></script>
|
52
|
+
|
53
|
+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
54
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
55
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
69
56
|
</body>
|
70
57
|
|
71
58
|
</html>
|
72
59
|
```
|
73
60
|
わかっていること
|
74
61
|
|
75
|
-
<link rel="stylesheet" href="https://
|
62
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
76
63
|
|
77
64
|
これを削除するとドロップダウンメニューは正常に動きます、ですがbootstrapが使えなくなります、理由は何でしょうか??どうしたら良いでしょうか?
|
78
65
|
|
79
|
-
よろしくお願いします。
|
66
|
+
よろしくお願いします。
|
67
|
+
|
68
|
+
```ここに言語を入力
|
69
|
+
@charset "UTF-8";
|
70
|
+
|
71
|
+
.navbar {
|
72
|
+
margin-top: 100px;
|
73
|
+
overflow: hidden;
|
74
|
+
background-color: rgb(0, 0, 0);
|
75
|
+
font-family: Arial, Helvetica, sans-serif;
|
76
|
+
}
|
77
|
+
|
78
|
+
.navbar a {
|
79
|
+
float: left;
|
80
|
+
font-size: 16px;
|
81
|
+
color: white;
|
82
|
+
text-align: center;
|
83
|
+
padding: 14px 16px;
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
.dropdown {
|
88
|
+
float: left;
|
89
|
+
overflow: hidden;
|
90
|
+
}
|
91
|
+
|
92
|
+
.dropdown .dropbtn {
|
93
|
+
font-size: 16px;
|
94
|
+
border: none;
|
95
|
+
outline: none;
|
96
|
+
color: white;
|
97
|
+
padding: 14px 16px;
|
98
|
+
background-color: inherit;
|
99
|
+
font: inherit;
|
100
|
+
margin: 0;
|
101
|
+
}
|
102
|
+
|
103
|
+
.navbar a:hover, .dropdown:hover .dropbtn {
|
104
|
+
background-color: red;
|
105
|
+
}
|
106
|
+
|
107
|
+
.dropdown-content {
|
108
|
+
display: none;
|
109
|
+
position: absolute;
|
110
|
+
background-color: #f9f9f9;
|
111
|
+
width: 100%;
|
112
|
+
left: 0;
|
113
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
114
|
+
z-index: 1;
|
115
|
+
}
|
116
|
+
|
117
|
+
.dropdown-content .header {
|
118
|
+
background: red;
|
119
|
+
padding: 16px;
|
120
|
+
color: white;
|
121
|
+
}
|
122
|
+
|
123
|
+
.dropdown:hover .dropdown-content {
|
124
|
+
display: block;
|
125
|
+
}
|
126
|
+
|
127
|
+
/* Create three equal columns that floats next to each other */
|
128
|
+
.column {
|
129
|
+
float: left;
|
130
|
+
width: 33.33%;
|
131
|
+
padding: 10px;
|
132
|
+
background-color: #ccc;
|
133
|
+
height: 250px;
|
134
|
+
}
|
135
|
+
|
136
|
+
.column a {
|
137
|
+
float: none;
|
138
|
+
color: black;
|
139
|
+
padding: 16px;
|
140
|
+
text-decoration: none;
|
141
|
+
display: block;
|
142
|
+
text-align: left;
|
143
|
+
}
|
144
|
+
|
145
|
+
.column a:hover {
|
146
|
+
background-color: #ddd;
|
147
|
+
}
|
148
|
+
|
149
|
+
/* Clear floats after the columns */
|
150
|
+
.row:after {
|
151
|
+
content: "";
|
152
|
+
display: table;
|
153
|
+
clear: both;
|
154
|
+
}
|
155
|
+
```
|