質問編集履歴
1
文法の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,4 +4,56 @@
|
|
4
4
|
文字のサイズを縦500px横500pxとして、その上に画像サイズを縦50px横50pxを乗せたいです。
|
5
5
|
cssにて、ポジションやz-indexなど設定しましたが、文字の上に画像が出てくることはありません。
|
6
6
|
|
7
|
-
そもそも出来ない事なのでしょうか?
|
7
|
+
そもそも出来ない事なのでしょうか?
|
8
|
+
コードを書き足させて頂きました。
|
9
|
+
|
10
|
+
```html
|
11
|
+
<header>
|
12
|
+
<div id="top_img">
|
13
|
+
<div class="text">
|
14
|
+
<p>安心・安全<br>足場の事なら</p>
|
15
|
+
</div>
|
16
|
+
<div class="icon">
|
17
|
+
<img src="imags/k0898_3.png" alt="">
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</header>
|
22
|
+
```
|
23
|
+
|
24
|
+
```scss
|
25
|
+
#top_img {
|
26
|
+
width: 100vw;
|
27
|
+
height: 100vh;
|
28
|
+
overflow: hidden;
|
29
|
+
position: relative;
|
30
|
+
|
31
|
+
.text {
|
32
|
+
p {
|
33
|
+
background-image: url("./imags/IMG_1211.jpeg");
|
34
|
+
background-size: cover;
|
35
|
+
background-repeat: no-repeat;
|
36
|
+
width: 100vw;
|
37
|
+
height: 100vh;
|
38
|
+
background-attachment: fixed;
|
39
|
+
background-position: 50% 50%; // animation: animationZoom 5s ease-in-out forwards;
|
40
|
+
color: #fff;
|
41
|
+
font-size: 4rem;
|
42
|
+
padding-top: 50px;
|
43
|
+
animation: sample2Anime 4s linear infinite alternate;
|
44
|
+
text-align: center;
|
45
|
+
z-index: -100;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
.icon {
|
50
|
+
img {
|
51
|
+
background-color: red;
|
52
|
+
position: absolute;
|
53
|
+
z-index: 100;
|
54
|
+
width: 200px;
|
55
|
+
height: 300px;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
```
|