gpt4 book ai didi

html - Css Float 无法正常工作

转载 作者:行者123 更新时间:2023-11-28 06:38:41 25 4
gpt4 key购买 nike

我正在尝试制作 this布局。

所以我试过了this .

.Projectscontent{
width:1024px;
margin:8% auto;
position:relative;
}

.Desccontent{
width:200px;


}

.Contentimage{
background-color:#F00;

width:200px;
height:40px;
}

.ContentDesc{
background-color:#F00;

width:200px;
height:40px;
}

.videoP{
width:700px;
float:left;
overflow:hidden;


}
 <div class="Projectscontent">
<div class="Desccontent">
<div class="Contentimage">fdf </div>
<div class="ContentDesc">dfd</div>
</div>
<div class="videoP">
<iframe src="https://player.vimeo.com/video/129369632"?autoplay=0&loop=0&title=0&byline=0&portrait=0 width="600" height="575" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</div>

但是不知何故视频没有向左浮动?有人有什么建议吗?提前致谢。

最佳答案

一如既往地想出了一个需要几个小时才能找到的简单答案 :P。

对于那些好奇的人,我所做的只是将 float left 添加到我的 desccontent 中。我知道。我在错误的事情上添加了 float 。我希望这对任何人都有帮助!

.Projectscontent{
width:1024px;
margin:8% auto;

}

.Desccontent{
width:200px;
float:left;


}

.Contentimage{
background-color:#F00;

width:200px;
height:40px;
}

.ContentDesc{
background-color:#F00;

width:200px;
height:40px;
}

.videoP{
width:700px;

overflow:hidden;


}
<div class="Projectscontent">
<div class="Desccontent">
<div class="Contentimage">fdf </div>
<div class="ContentDesc">dfd</div>
</div>
<div class="videoP">
<iframe src="https://player.vimeo.com/video/129369622"?autoplay=0&loop=0&title=0&byline=0&portrait=0 width="600" height="575" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</div>

关于html - Css Float 无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34471237/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com