粗体< b>< / b>和斜体< i>< / i>标签在iPhone和Internet Explorer上正确呈现,但Firefox或Chrome中没有格式.
这是.css文件.我也尝试添加i {font-style:italic;分别在重置和样式中.
Color.css: body { color: #fff; background-image: url(../img/background-red.png); } Reset.css: /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,input,textarea,button table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,au@R_404_410@,video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article,section { display: block; } body { line-height: 1; } ol,dl { list-style: none; } blockquote,q { quotes: none; } blockquote:before,blockquote:after,q:before,q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } Style.css: html,body { height: 100%; } body { margin: 0; overflow: hidden; font: normal 18px/1.4 'Open Sans',Arial,Helvetica,sans-serif; background-position: left top; background-repeat: no-repeat; } .panel { position: absolute; z-index: 0; background: #fff; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); opacity: 0; -moz-Box-shadow: 0 0 10px #fff; -webkit-Box-shadow: 0 0 10px #fff; Box-shadow: 0 0 10px #fff; } .content { max-width: 45%; margin: 100px; float: left; position: relative; z-index: 1; } h1 { font-size: 72px; line-height: 56px; font-weight: 300; } h2 { margin: 15px 0 50px; font-size: 30px; line-height: 30px; font-weight: 300; }
这是HTML,我尝试使用< strong> asdf< / strong>看它是否会使文字变粗,但事实并非如此.
<div class="content"> <h1>adssda</h1> <h2>dasdasdsa</h2> <p><i><strong>sadsad</strong>asdsad</i></p><br> sadasddsa<br><br> <strong>asdasd</strong><br><br> <p><strong>asdasd</strong></p><br> </div>
为什么粗体文本看起来与普通文本相同?
解决方法
字体:在主复位块中继承(复位头下的第一个)会导致页面上的所有字体被重置.的确,not even fixing the invalid html to be valid fixes this,你的css记在心里.