Home > php教程 > php手册 > body text

如何检测浏览器是否支持CSS3?

WBOY
Release: 2016-06-06 20:01:16
Original
1139 people have browsed it

如何检测用户的浏览器是否支持CSS3,我们需要使用HTML,CSS和JavaScript来完成这件事情。 下面是步骤。 1)先制作下面的HTML span id="check" rel="Detect"/span 2)然后书写下面的CSS #check { display: none; width: 0; height: 0; } #check[rel^="D"] { d

如何检测用户的浏览器是否支持CSS3,我们需要使用HTML,CSS和JavaScript来完成这件事情。

下面是步骤。

1)先制作下面的HTML

2)然后书写下面的CSS

#check { 
display: none; 
width: 0; 
height: 0; 
} 
#check[rel^="D"] { 
display: block; 
width: 0; 
height: 0; 
}

3)下面是JavaScripts的检测脚本

请确保下面的代码放在HTML文件头。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!