css中style和class的加载顺序示例介绍
2013-10-09 14:52
716 查看
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> <meta name="author" content="Administrator" /> <!-- Date: 2013-10-09 --> <style type="text/css" media="screen"> .aa{ cursor: wait; color: #f00; } </style> <script type="text/javascript"> function clickD(obj){ //obj.style.color = "#f00"; //obj.style.cursor = "wait"; obj.className = "aa"; } </script> </head> <body> <div onclick="clickD(this)" style="cursor: pointer">点击了试一下</div> </body> </html>
这样的写法,不会覆盖style的cursor属性,以style中的属性为最后结果!
用注释中的写法,会覆盖掉style的属性!
相关文章推荐
- javascript预加载图片、css、js的方法示例介绍
- javascript预加载图片、css、js的方法示例介绍
- CSS定义超链接样式的顺序及四个伪类的用法示例介绍
- 判断在css加载完毕后执行后续代码示例
- JavaScript+CSS控制打印格式示例介绍
- Tomcat启动时classloader加载顺序
- Tomcat的class加载的优先顺序一览
- Tomcat中jar包和class的加载顺序
- html,css,js加载顺序
- 分析Java的类加载器与ClassLoader(二):classpath与查找类字节码的顺序,分析ExtClassLoader与AppClassLoader的源码
- 动态加载、移除js/css文件的示例代码
- CSS id/class选择器以id/class和CSS属性选择器以为属性作为筛选条件在格式上的介绍
- JavaScript动态加载资源【js|css】示例代码
- CSS——————CSS样式加载顺序及覆盖顺序
- 浏览器加载渲染HTML、DOM、CSS、 JAVASCRIPT、IMAGE、FLASH、IFRAME、SRC属性等资源的顺序总结
- css基础 class选择器 简单示例
- JS/CSS/IMG加载顺序关系之DOMContentLoaded事件
- jsp页面中的代码执行加载顺序介绍
- css与html常见的三种结合方式示例介绍
- html,css,js加载顺序