teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

誤字修正

2017/06/21 10:04

投稿

Erika
Erika

スコア12

title CHANGED
File without changes
body CHANGED
@@ -16,7 +16,7 @@
16
16
  ```css
17
17
  section {
18
18
  position: relative;
19
- overflow-y: hidden; ←効かない
19
+ overflow-x: hidden; ←効かない
20
20
  }
21
21
  section:before { ←縦にはみだしたい、しかし横は切りたい
22
22
  position: absolute;

1

htmlとcssの内容をつけたしました。

2017/06/21 10:03

投稿

Erika
Erika

スコア12

title CHANGED
File without changes
body CHANGED
@@ -6,4 +6,22 @@
6
6
  と指定しましたが、overflow: hidden;と指定したときと同じように上下左右非表示になってしまいます。
7
7
  調べたところposition: relative;をつけるといいとのことでしたが、改善されずでした。
8
8
 
9
- よろしくお願いします。
9
+ よろしくお願いします。
10
+
11
+ ------追記----------
12
+ ```html
13
+ <section>
14
+ </section>
15
+ ```
16
+ ```css
17
+ section {
18
+ position: relative;
19
+ overflow-y: hidden; ←効かない
20
+ }
21
+ section:before { ←縦にはみだしたい、しかし横は切りたい
22
+ position: absolute;
23
+ bottom: 0;
24
+ left: 50%;
25
+ background: url(../img/pic.png) no-repeat center top;
26
+ }
27
+ ```