2015-12-26 120 views
0

我正在尝试使this布局。因为我试过thisCss浮动左不工作

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

 
.Desccontent{ 
 
\t \t width:200px; \t 
 
\t 
 

 
} 
 

 
.Contentimage{ 
 
\t background-color:#F00; 
 
\t 
 
\t width:200px; 
 
\t height:40px; 
 
} 
 

 
.ContentDesc{ 
 
\t background-color:#F00; 
 
\t 
 
\t \t width:200px; 
 
\t \t height:40px; 
 
} 
 

 
.videoP{ 
 
\t width:700px; 
 
\t float:left; 
 
\t overflow:hidden; 
 
\t \t 
 
\t \t 
 
}
<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>

但不知何故,该视频是不是浮动剩下什么?任何人有任何建议?提前致谢。

+0

请上传通过点击编辑工具栏中的图像按钮或按下Ctrl + G以imgur图像。这将允许看到它,它会从OneDirve中删除。 –

+0

好吧,我现在改变它:) – UpARiver

+1

请正确地格式化/缩进您的代码。 –

回答

0

想通了,和往常一样,一个简单的答案需要数小时才能找到:P。

对于那些好奇的人,我所做的只是添加浮动到我的desccontent。我知道。我正在增加浮动到错误的东西。我希望这可以帮助任何人!

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

 
} 
 

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

 
} 
 

 
.Contentimage{ 
 
\t background-color:#F00; 
 
\t 
 
\t width:200px; 
 
\t height:40px; 
 
} 
 

 
.ContentDesc{ 
 
\t background-color:#F00; 
 
\t 
 
\t \t width:200px; 
 
\t \t height:40px; 
 
} 
 

 
.videoP{ 
 
\t width:700px; 
 
\t 
 
\t overflow:hidden; 
 
\t \t 
 
\t \t 
 
}
<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>