【发布时间】:2011-12-10 22:17:32
【问题描述】:
我有以下代码:
<div id="intro_section_upper" >
<%= image_tag("video_background.jpg", :id=>"video_bg") %>
<div id="video_table_main" >
<table class="video_table">
<% count = 0 %>
<tr>
<% @f_videos.each do |f_video| %>
<td><div class= "video_cell">
<%= f_video.name %> </br>
<%= image_tag(f_video.thumbnail_url, :class => "video_thumb") %>
</td></div>
<% count +=1 %>
<% if count % 4 == 0 %>
</tr>
<% end %>
<% end %>
</table>
</div>
现在我写的 CSS 是:
#intro_section_upper
{
position: relative;
width: 1024px;
min-width: 1000px;
min-height: 600px;
margin: 150px auto;
color: #333399;
border-style:solid;
border-width:1px;
border-color:#3366CC;
border-radius: 15px;
background-color:#3366CC;
font-family: 'Arial';
font-size:16px;
}
/* Float fix */
#video_table_main {
height:600px; overflow:auto;
}
img#video_bg
{
width:100%;
height:100%;
}
/* Individual Video Data Cell Formatting */
.video_cell
{
color: #C0C0C0; font-weight:bold; font-size:1em;
}
.video_thumb
{
vertical-align:text-top;
width: 180px;
height : 180px
}
基本上,我希望缩略图表出现在背景图像之上,而不是在它之后,即在它之下。我的边框也是圆形的。我怎样才能把图像的边框也弄圆,这样我就没有那些尖尖的边缘了? 谢谢
【问题讨论】:
-
您能提供我们生成的 HTML 吗?这与 RoR 无关。
-
我正在使用 ruby on rails 代码,所以我认为它可能是
-
RoR 并没有真正发挥作用,因为它会将 HTML 输出给最终用户。您遇到了 HTML 问题。
标签: html ruby-on-rails css