sách gpt4 ai đã đi

html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?

In lại 作者:行者123 更新时间:2023-11-27 22:28:34 32 4
mua khóa gpt4 Nike

我有一个像这样的简单行:

 #footer {
position:relative;
border-top:1px solid #cecece;
z-index:20;
}

#footer ul.footer-row {
float: bên trái;
margin: 0 32px;
}

IE9 IE10 都可以正常工作。但出于某种原因,IE8 不会呈现此 css 中的任何行,除非我将其从#footer 中取出并按原样放置:

 #footer {
position:relative;
border-top:1px solid #cecece;
z-index:20;
}

ul.footer-row {
float: bên trái;
margin: 0 32px;
}

那么IE8遵循的是什么奇怪的规则呢?完全难住了。

这是我的 SCSS :

#footer {
position:relative;
border-top:1px solid #cecece;
z-index:20;
nav#footer_inside {
font-size:14px;
margin:0 auto;
ul.footer-row {
float: bên trái;
margin: 0 32px;
a { margin-bottom: 2px; }
}
}
}

这就是它编译的结果,实际上被忽略了。

#footer nav#footer_inside ul.footer-row {
float: bên trái;
margin: 0 32px;
}

1 Câu trả lời

Thêm vàoHTML5 shivđến <đầu> :


IE<=8 默认情况下不会为无法识别其标签名称的元素设置样式。当给定的标签名称传递给 document.createElement() 时,这会发生变化,这基本上就是 shiv 对所有 HTML5 的新标签名称所做的。

从历史上看,这种“hack”是在 HTML5 标准化过程的早期阶段被发现的,从而插入了 HTML5 语义的采用。

关于html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20683329/

32 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com