加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – Bold和Italics在Firefox或Chrome中不起作用

发布时间:2020-12-14 22:30:21 所属栏目:资源 来源:网络整理
导读:粗体 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);
粗体< 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,audio,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记在心里.

评论此房产fixes your text.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读