【发布时间】:2016-07-19 09:18:29
【问题描述】:
各位,我的 CSS 无法在 IE 浏览器上运行。在Chrome 和Firefox 中它工作正常,但在IE 中它没有应用单一样式。如果您有任何解决方案,请告诉我。
【问题讨论】:
标签: css internet-explorer
各位,我的 CSS 无法在 IE 浏览器上运行。在Chrome 和Firefox 中它工作正常,但在IE 中它没有应用单一样式。如果您有任何解决方案,请告诉我。
【问题讨论】:
标签: css internet-explorer
兄弟……你用的是哪个版本的IE? IE 不太支持 HTML 5。请浏览以下链接,可能会对您有所帮助:
header/footer/nav tags - what happens to these in IE7, IE8 and browsers than don't support HTML5?
html5 new elements (header, nav, footer, ..) not working in IE
还有这个
【讨论】:
是的,某些 css 不能在 IE 旧版本中运行。所以IE浏览器需要使用--webkit来支持css
例如。
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#d5cea6+0,c9c190+40,b7ad70+100;Brown+3D */
background: #d5cea6; /* Old browsers */
background: -moz-linear-gradient(top, #d5cea6 0%, #c9c190 40%, #b7ad70 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5cea6', endColorstr='#b7ad70',GradientType=0 ); /* IE6-9 */
在此处添加背景渐变以支持 IE
background: linear-gradient(to bottom, #d5cea6 0%,#c9c190 40%,#b7ad70 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d5cea6', endColorstr='#b7ad70',GradientType=0 ); /* IE6-9 */
【讨论】: