


reposted from blue ideal
author bias
original address http://www.blueidea.com/tech/site/2006/3296.asp
i found several different versions before the ie browser, which can be run independently, is just perfect for testing page compatibility issues. you won’t know until you try it. pages that work fine in ie6 and ff will become a mess in ie5 and ie5.5. i have always heard that ie5 is a "nail" in the creation of web standards, and now i have to believe it.
since there is a problem, let’s look for a solution. after searching on the internet, there are still many related articles. i think the most direct method is "ie conditional comments", which is very convenient. can write styles for different versions of ie. but this requires writing a style for each version, which is not conducive to file optimization.
after looking for some related css hacks, i think it should be possible to write the hacks of ie5/ie5.5/ie6/ff together. after testing, i finally found a good method. below we let’s see how to implement it:
everyone knows that using the !important statement can increase the application priority of specified style rules, such as the following example:
-------------- ----------------------------------
copy code the code is as follows:
e1{ background-color: red !important;/*提升优先权*/ background-color: blue; }
------------------------------------------------ ----
but there will be a problem when writing this way in ie. after reading my "about css style sheet priority" and "about css style sheet priority supplement", you will know that in using the !important declaration in ie6 and ff can increase the priority level, but the !important declaration in ie6 is not absolute and will be replaced by subsequent attribute definitions of the same name. that is to say, in the above example, ie6 applies the last background color value, which is "blue"; while in ff, the background color value is "red". based on this, we can separate the styles of ff and ie.
ok, the problems of ff and ie have been solved, now let’s solve the problem of ie itself.
after reading dudu's "another way to bypass ie6 and support ie5 - ie also supports ">"", i was inspired by this. is it really possible for ie to recognize it if i use ">"? let's look at an example:
---------------------------------------- ----------
E1{ background-color: red; >background-color: blue;
}
------------------- ----------------------------------
what you get in ff is the background color red, while in ff the background color obtained in ie is blue. according to the rules of style redefinition, if the browser can recognize ">", it should get a blue background. therefore, it can be known that ">" can only be recognized by ie. this is very important. it's important! everyone will know later. (note: i have tested some other symbols, such as "~", "`", "
------------------ -------------------------------
wouldn't this save a few bytes? ? that’s right, but hack is not a standard. if you abuse hack, it will only get further and further away from the standard!
the above is the content of css_experience exchange to solve the compatibility problem of ie5/ie5.5/ie6/ff. for more related content, please pay attention to the php chinese website (www.php.cn)!

在css中,可用list-style-type属性来去掉ul的圆点标记,语法为“ul{list-style-type:none}”;list-style-type属性可设置列表项标记的类型,当值为“none”可不定义标记,也可去除已有标记。

区别是:css是层叠样式表单,是将样式信息与网页内容分离的一种标记语言,主要用来设计网页的样式,还可以对网页各元素进行格式化;xml是可扩展标记语言,是一种数据存储语言,用于使用简单的标记描述数据,将文档分成许多部件并对这些部件加以标识。

近日,PHP8.0正式发布,作为一名Laravel开发者,你或许正在思考着将你的项目升级至最新版的PHP,以收获更多的特性和性能提升,但在此之前,你需要知道PHP8.0与Laravel之间存在的兼容性问题,以便更好的规避和解决这些问题。首先,我们来了解一下PHP8.0带来了哪些变化。PHP8.0最大的变化在于其对JIT(Just-In-Time)编译器的引入

在css中,rtl是“right-to-left”的缩写,是从右往左的意思,指的是内联内容从右往左依次排布,是direction属性的一个属性值;该属性规定了文本的方向和书写方向,语法为“元素{direction:rtl}”。

转换方法:1、给英文元素添加“text-transform: uppercase;”样式,可将所有的英文字母都变成大写;2、给英文元素添加“text-transform:capitalize;”样式,可将英文文本中每个单词的首字母变为大写。

在css中,可以利用“font-style”属性设置i元素不是斜体样式,该属性用于指定文本的字体样式,当属性值设置为“normal”时,会显示元素的标准字体样式,语法为“i元素{font-style:normal}”。

在css3中,可以用“transform-origin”属性设置rotate的旋转中心点,该属性可更改转换元素的位置,第一个参数设置x轴的旋转位置,第二个参数设置y轴旋转位置,语法为“transform-origin:x轴位置 y轴位置”。

Win10安装失败原因随着科技的飞速发展,操作系统也在不断更新迭代,微软的Windows系统一直以来都受到广大用户的喜爱。然而,在使用Windows10操作系统的过程中,有些用户可能会遇到安装失败的情况,那么这些安装失败的原因究竟是什么呢?一、硬件兼容性问题如果你的电脑硬件配置较老旧或者不兼容Windows10操作系统的最低硬件要求,那么安装过程中很有可


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
