我想使文本停留在右下角,但一旦我改变窗口的高度或宽度,它超出曲线(如图here)处的文本留在右下角
我的当屏幕尺寸改变时,尝试用百分比,vw,vh,em和it still goes out of the curve进行定位。
有关如何定位这个位置的任何想法,因此无论屏幕大小如何,它总是保持在该曲线内?
下面是代码:
.phone-number {
position: absolute;
bottom: 20vh;
right: 5vh;
color: #472d23;
font-weight: 600;
font-size: 3vh;
}
.landing-page {
background: url("../img/bg2.jpg");
background-size: cover;
background-repeat: no-repeat;
height: 100vh;
background-position: center;
position: relative;
overflow: hidden;
-webkit-transition: all 2s ease-in-out;
-moz-transition: all 2s ease-in-out;
transition: all 2s ease-in-out;
}
.curve {
background: url("../img/Curve.png");
background-position: bottom center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
height: 100vh;
}
<div class="row">
<div id="carasoul" class="landing-page">
<div class="curve">
<div class="container">
<h3 class="phone-number">+1 800-800-800</h3>
</div>
</div>
</div>
</div>
你的代码在哪里? –
请添加您的代码。 – AdhershMNair
对不起。我添加了我的代码 –