質問編集履歴

1

HTML

2022/09/27 13:53

投稿

Tomato_leaf
Tomato_leaf

スコア173

test CHANGED
File without changes
test CHANGED
@@ -43,3 +43,45 @@
43
43
  ```
44
44
 
45
45
 
46
+
47
+
48
+ 単純なHTML, CSSを追記しました。
49
+ これでも上に空白ができます。。
50
+
51
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-09-27/a98f9269-3b21-46ae-8b24-e0c78f4405b4.png)
52
+
53
+ ```index.html
54
+ <!DOCTYPE html>
55
+ <html>
56
+ <head>
57
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
58
+ <link rel="stylesheet" type="text/css" href="main.css" />
59
+ <title>sample</title>
60
+ <link href="css/bootstrap.min.css" rel="stylesheet">
61
+ </head>
62
+ <body>
63
+ <div class="container">
64
+ <div class="row mx-auto text-center">
65
+ <div class="col-3">
66
+ <div class="box_switch">
67
+ <p class="p">PPPPPPPPPPP</p>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </body>
72
+ </html>
73
+ ```
74
+
75
+ ```main.css
76
+ .p {
77
+ color: white;
78
+ }
79
+ .box_switch {
80
+ position: relative;
81
+ background:#1E3E75;
82
+ padding:15px;
83
+ margin-bottom: 30px;
84
+ margin: 0px calc(50% - 50vw) 15px;
85
+ width: 100vw;
86
+ }
87
+ ```