CSS响应标记部分
为了提高我的css技能,我创建了一个小型网站,目的是在创建响应性网站时获得最佳实践。以下是简单的HTML标记:CSS响应标记部分,css,responsive-design,responsive,responsive-images,Css,Responsive Design,Responsive,Responsive Images,为了提高我的css技能,我创建了一个小型网站,目的是在创建响应性网站时获得最佳实践。以下是简单的HTML标记: <section class="bg-image"> <img src="https://placehold.it/1606x1189" alt="imagem"/> <div class="title"> <h2>I'm Title, <br />Sub
<section class="bg-image">
<img src="https://placehold.it/1606x1189" alt="imagem"/>
<div class="title">
<h2>I'm Title, <br />Sub Title</h2>
<button class="button-type-1">Click Me 1</button>
</div>
<div class="box">
<p class=".box-type-1">
There’s no magic pill you can take that will somehow attract rich people to your cause like moths to a flame.</p>
<p class=".box-type-2">
There’s no magic pill you can take that will somehow attract rich people to your cause like moths to a flame.</p>
<br />
<button class="button-type-2">Click Me 2</button>
<button class="button-type-3">Click Me 3</button>
</div>
</section>
因此,当我放大div标签内容时,我如何解决这个问题,使其保持响应,而不只是离开视口
创建响应性应用程序时,我应该参考的最佳实践是什么。使用flexbox使网站响应性更强。是的,我同意flexbox,但也可以不使用flexbox解决此问题吗?谢谢
.image{
position: relative;
max-width: 100%;
height: 1189px;
width: 1606px;
opacity: 0.75;
}
.title h2 {
position: absolute;
color: rgb(37, 37, 78);
padding: 10px;
top:132px;
left:32%;
font-size: 80px;
letter-spacing: -0.1px;
line-height: 70px;
}
.title .button-type-1 {
position: absolute;
background-color: rgb(177, 166, 9);
height: 48px;
width: 265px;
border: 1px solid #FFFFFF;
border-radius: 34px;
left:43%;
top: 33%;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1), 0 10px 20px 0 rgba(0,0,0,0.05);
}
.box {
position: absolute;
left:150px;
top: 550px;
height: 270px;
width: 60%;
left:23%;
border-radius: 4px;
background-color: #FFFFFF;
box-shadow: 0 0 30px 0 rgba(0,0,0,0.05), 0 4px 8px 0 rgba(0,0,0,0.08);
}
.box .box-type-1 {
height: 26px;
width: 315px;
color: #1E1C1A;
font-family: ".SF NS Display";
font-size: 25px;
line-height: 26px;
}
.box .box-type-2 {
height: 56px;
width: 1017px;
color: #535355;
font-family: ".SF NS Display";
font-size: 20px;
line-height: 28px;
text-align: center;
}
.button-type-2 {
height: 48px;
width: 224px;
border-radius: 34px;
background-color: #3d8b49;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1), 0 10px 20px 0 rgba(0,0,0,0.05);
}
.button-type-3 { height: 48px; width: 209px; border-radius: 34px;
background-color: #B8455a;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1), 0 10px 20px 0 rgba(0,0,0,0.05);
}