0

我的网站“新闻和媒体”部分,我希望在视频旁边(右侧)出现一个白色方块(在右侧),其中包含“你好”这个词。不幸的是,这不起作用。我看到你好这个词,但不是在一个白色的方块中。知道问题是什么以及如何解决吗?非常感谢,

这是我的html:

<div class="section" id="medias">
<div class="center">
     <iframe width="350" height="200" class="youtube-player" src="http://www.youtube.com/embed/qqXi8WmQ_WM" frameborder="0" allowfullscreen></iframe>
<div id="medias-txt"
        <p>hello</p></div>
 </div>
</div><!--END page4-->

这是我的CSS:

#medias-txt
{
    background-color:#fff;
    color:#000;
    width:100px;
    height:100px;
    padding:10px;
    float:right;
}
4

2 回答 2

1

你没有关闭你的 div 标签

<div class="section" id="medias">
<div class="center">
     <iframe width="350" height="200" class="youtube-player" src="http://www.youtube.com/embed/qqXi8WmQ_WM" frameborder="0" allowfullscreen></iframe>
<div id="medias-txt">
        <p>hello</p></div>
 </div>
</div><!--END page4-->

这应该可以解决问题。

PS喜欢那个页面上的视频:)

于 2012-07-21T09:20:16.500 回答
-1

在您的 CSS 中,您需要在冒号和内容之间添加空格。例如:

#medias-txt
{
background-color: #fff;
color: #000;
width: 100px;
height: 100px;
padding: 10px;
float: right;
}
于 2015-07-28T15:15:54.043 回答