所以我有一个在 x 轴上重复的小标题图像,但由于某些原因它不会显示在 IE8 中。有人知道解决方法吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content='' name='description' />
<meta content='' name='keywords' />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>Book Site</title>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="title">
<span class="maintitle">Site Title Goes Here</span>
<br />
<span class="subtitle">Transitional Justice, Post-Conflict Reconstruction & Reconciliation in Rwanda and Beyond
Phil Clark and Zachary D. Kaufman, editors</span>
</div>
<img class="thebook" src="images/thebook.png" />
<span class="bookblurb">
<span class="bookbuy">Buy the book</span>
get it online
<br />
from Columbia,
Hurst or your
favorite reseller
</span>
</div>
<div id="navbar">
<ul>
<li>HOME</li>
<li>ABOUT THE BOOK</li>
<li>AUTHORS</li>
<li>NEWS & EVENTS</li>
<li>KIGALI PUBLIC LIBRARY</li>
<li>CONTACT US</li>
</ul>
</div>
<div id="content">
<div id="blockone">
<div id="polaroid">
<img class="polaroid" src="images/polaroid.png" />
<br />
<span class="roidplace">Gisimba Memorial Centre</span>
<br />
<span class="roidname">Kigali, Rwanda</span>
</div>
<div id="textblockone">
<h3>An incisive analysis of genocide and its aftermath</h3>
<br />
<span class="description">In After Genocide leading scholars and practitioners analyse the political, legal and regional impact of events in post-genocide Rwanda within the broader themes of transitional justice, reconstruction and reconciliation. Given the
forthcoming fifteenth anniversary of the Rwandan genocide, and continued mass violence in Africa, especially in Darfur, the Democratic Republic of Congo (DRC) and northern Uganda, this volume is unquestionably of continuing relevance. </span>
</div>
</div>
<div id="form">
<div id="statement">
This book should be labeled for the mature individual only. But for that mature individual it is of extreme interest.
It shows, far from any Manichean stereotyping, the many facets of having to try to live in an impossibly complex social
and human situation. Highly recommended.
<br /><br />
<span class="author">-Grard Prunier</span>
<br /><span class="bookname">The Rwanda Crisis: History of a Genocide (Hurst, 1995)</span>
</div>
<div id="contactform">
<span class="contactus">Contact us for additional information and site updates</span>
<br />
<span class="theform">
<form class="forming">
Name:
<input type="text" name="firstname" />
<br />
Title:
<input type="text" name="title" />
<br />
Institution:
<input type="text" name="institution" />
<br />
Email:
<input type="text" name="email" />
<br />
Message:
<input type="text" name="message" class="message" />
</form>
</span>
</div>
</div>
</div>
<div id="footer">
<p class="footernav">© 2008 After Genocide <span class="footerlinks">Sitemap | Terms | Privacy | Contact </span>
<span class="plug">Web design by <span class="avity">Avity</span>
</p>
</div>
</div>
</body>
</html>
----------------css--------------------
html, body {
margin:0;
padding:0;
background-color:#fdffe3;
font-family: Arial, Helvetica, sans-serif;
}
#wrapper {
width:1020px;
margin:0 auto;
}
/*begin header style*/
#header {
background:url("images/headback.png")repeat-x;
width:1020px;
height:120px;
font-family:arial;
position:relative;
}
#title {
width:565px;
height:100px;
float:left;
margin:20px 0 0 100px;
}
.maintitle {
font-size:40px;
}
.subtitle {
font-size:13px;
}
.thebook {
float:left;
margin:10px 0 0 30px;
border:2px solid #666666;
}
.bookblurb {
float:left;
width:110px;
margin:15px 0 0 15px;
font-size:13px;
}
.bookbuy {
font-weight:bold;
font-size:14px;
}
/*end header style*/
/*begin navigation style*/
#navbar {
margin:5px 0 0 0;
height: 30px;
width: 1020px;
background-color: #3a3e30;
}
#navbar ul {
padding: 0px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFF;
line-height: 30px;
white-space: nowrap;
margin:0 0 0 140px;
}
#navbar ul li {
list-style-type: none;
display: inline;
margin:0 40px 0 0;
}
/*end navigation style*/
/*begin content style*/
#content {
width:775px;
margin:0 auto;
}
#blockone {
margin:25px 0 0 0;
}
#polaroid {
float:left;
width:230px;
}
.roidplace {
font-weight:bold;
font-size:11px;
}
.roidname {
font-size:11px;
margin:0 0 0 40px;
}
#textblockone {
width:745px;
margin:0 0 0 0;
font-family: Arial, Helvetica, sans-serif;
}
.description {
font-size:13px;
}
#form {
background:url("images/formbackround.png") no-repeat;
width:758px;
height:231px;
margin:80px 0 0 10px;
}
#statement {
width:320px;
margin:30px 0 0 30px;
position:absolute;
font-size:15px;
font-style:italic;
float:left;
}
.author {
font-weight:bold;
font-size:14;
}
.bookname {
font-weight:bold;
font-size:11px;
color:#3f91ad;
}
#contactform {
float:right;
width:320px;
margin:20px 30px 0 0;
}
.contactus {
font-weight:bold;
font-size:12px;
}
.theform {
}
.forming {
}
.message {
height:50px;
}
#footer {
width:1020px;
height:65px;
background-color:#dfdacc;
margin:35px 0 0 0;
font-size:13px;
font-weight:bold;
}
.footernav {
margin:30px 0 0 150px;
position:absolute;
width:1020px;
}
.footerlinks {
margin:0 10px 0 10px;
color:#0f77a9;
}
.plug {
margin:0 0 0 175px;
}
.avity {
color:#0f77a9;
}
最佳答案
尝试在 ) 和 repeat-x 之间添加一个空格。
关于html - 背景图片在 IE8 中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2481222/
我想将html转换为纯文本。不过,我不想只删除标签,我想智能地保留尽可能多的格式。为插入换行符标签,检测段落并格式化它们等。输入非常简单,通常是格式良好的html(不是整个文档,只是一堆内容,通常没有anchor或图像)。我可以将几个正则表达式放在一起,让我达到80%,但我认为可能有一些现有的解决方案更智能。 最佳答案 首先,不要尝试为此使用正则表达式。很有可能你会想出一个脆弱/脆弱的解决方案,它会随着HTML的变化而崩溃,或者很难管理和维护。您可以使用Nokogiri快速解析HTML并提取文本:require'nokogiri'h
我得到了一个包含嵌套链接的表单。编辑时链接字段为空的问题。这是我的表格:Editingkategori{:action=>'update',:id=>@konkurrancer.id})do|f|%>'Trackingurl',:style=>'width:500;'%>'Editkonkurrence'%>|我的konkurrencer模型:has_one:link我的链接模型:classLink我的konkurrancer编辑操作:defedit@konkurrancer=Konkurrancer.find(params[:id])@konkurrancer.link_attrib
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
在我的Controller中,我通过以下方式在我的index方法中支持HTML和JSON:respond_todo|format|format.htmlformat.json{renderjson:@user}end在浏览器中拉起它时,它会自然地以HTML呈现。但是,当我对/user资源进行内容类型为application/json的curl调用时(因为它是索引方法),我仍然将HTML作为响应。如何获取JSON作为响应?我还需要说明什么? 最佳答案 您应该将.json附加到请求的url,提供的格式在routes.rb的路径中定义。这
所以我在关注Railscast,我注意到在html.erb文件中,ruby代码有一个微弱的背景高亮效果,以区别于其他代码HTML文档。我知道Ryan使用TextMate。我正在使用SublimeText3。我怎样才能达到同样的效果?谢谢! 最佳答案 为SublimeText安装ERB包。假设您安装了SublimeText包管理器*,只需点击cmd+shift+P即可获得命令菜单,然后键入installpackage并选择PackageControl:InstallPackage获取包管理器菜单。在该菜单中,键入ERB并在看到包时选择
我试图在索引页中创建一个超链接,但它没有显示,也没有给出任何错误。这是我的index.html.erb代码。ListingarticlesTitleTextssss我检查了我的路线,我认为它们也没有问题。PrefixVerbURIPatternController#Actionwelcome_indexGET/welcome/index(.:format)welcome#indexarticlesGET/articles(.:format)articles#indexPOST/articles(.:format)articles#createnew_articleGET/article
我有一张背景图片,我想在其中添加一个文本框。我想弄清楚如何将标题放置在其顶部的正确位置。(我使用标题是因为我需要自动换行功能)。现在,我只能让文本显示在左上角,但我需要能够手动定位它的开始位置。require'RMagick'require'Pry'includeMagicktext="Loremipsumdolorsitamet"img=ImageList.new('template001.jpg')img 最佳答案 这是使用convert的ImageMagick命令行的答案。如果你想在Rmagick中使用这个方法,你必须自己移植
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c
我正在使用Rails构建一个简单的聊天应用程序。当用户输入url时,我希望将其输出为html链接(即“url”)。我想知道在Ruby中是否有任何库或众所周知的方法可以做到这一点。如果没有,我有一些不错的正则表达式示例代码可以使用... 最佳答案 查看auto_linkRails提供的辅助方法。这会将所有URL和电子邮件地址变成可点击的链接(htmlanchor标记)。这是文档中的代码示例。auto_link("Gotohttp://www.rubyonrails.organdsayhellotodavid@loudthinking.
我是Rails的新手,所以请原谅简单的问题。我正在为一家公司创建一个网站。那家公司想在网站上展示它的客户。我想让客户自己管理这个。我正在为“客户”生成一个表格,我想要的三列是:公司名称、公司描述和Logo。对于名称,我使用的是name:string但不确定如何在脚本/生成脚手架终端命令中最好地创建描述列(因为我打算将其设置为文本区域)和图片。我怀疑描述(我想成为一个文本区域)应该仍然是描述:字符串,然后以实际形式进行调整。不确定如何处理图片字段。那么……说来话长:我在脚手架命令中输入什么来生成描述和图片列? 最佳答案 对于“文本”数