Thank you for your help.
I want the element to stick out from the left edge and display it.
to the parent element as shown in the code below.
overflow:visible
doesn't work.
↓
Scroll to the right (image 2)
∧∧∧∧ ここ I want to show you the 100px part here.
<body>
<div class="container">
<div class="box">
</div>
</div>
</body>
CSS
@charset "UTF-8";
*{
margin:0;
padding:0;
}
body{
background:black;
}
US>.container{
background:gray;
width —500px;
height —500px;
position:relative;
left: -100px;
/* overflow:visible;error (correct)*/
}
.box{
width —200px;
height —200px;
background:tomato;
}
Do you want to do something like this?
*{
margin:0;
padding:0;
}
body{
background:black;
}
US>.container{
background:gray;
width —500px;
height —500px;
position:relative;
/* left: -100px;deleted*/
overflow:visible;
margin-left: 100px; /* add */
}
.box{
position: absolute; /* add */
width —200px;
height —200px;
background:tomato;
left: -100px; /* Added */
}
© 2024 OneMinuteCode. All rights reserved.