jQuery css() 方法
来源:互联网 发布:常熟江南淘宝摄影公司 编辑:程序博客网 时间:2024/05/16 00:55
css( propertyName ):获取匹配元素集合中第一个元素的计算样式属性。
**propertyName :**String类型或者是array类型,一个css属性或者一个或多个CSS属性的数组。
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>css demo</title> <style> div { width: 60px; height: 60px; margin: 5px; float: left; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script></head><body><span id="result"> </span><div style="background-color:blue;"></div><div style="background-color:rgb(15,99,30);"></div><div style="background-color:#123456;"></div><div style="background-color:#f11;"></div><script>$( "div" ).click(function() { var color = $( this ).css( "background-color" ); $( "#result" ).html( "That div is <span style='color:" + color + ";'>" + color + "</span>." );});</script></body></html>
阅读全文
0 0
- jQuery CSS 操作 - css() 方法
- jQuery CSS 操作 - css() 方法
- jQuery CSS 操作 - css() 方法
- jquery样式jquery.css()方法
- JQuery CSS 方法说明
- JQuery CSS 方法说明
- JQuery CSS 方法说明
- Jquery css方法
- jQuery的css方法
- jQuery - css() 方法
- jQuery - css() 方法
- jQuery css() 方法
- 17. jQuery - css() 方法
- 详解Jquery .css()方法
- jquery css()方法
- JQuery css方法
- jQuery - css() 方法
- jQuery css() 方法
- Common(四)—— Protocal
- 最大似然估计法 Maxmium Likelihood Estimation(MLE)
- 阅读类 App
- 机器学习-SVM算法
- 为何前后端要分离
- jQuery css() 方法
- SpringBoot启动报错" Unable to start embedded container; nested exception is org.springframework.beans.fa
- Python
- C++和JNI的数据转换
- Android逆向系列之动态调试2–Smali注入
- 手把手 | 30行JavaScript代码,教你分分钟创建神经网络
- express+mysql连接池
- hdu1754 I Hate It(线段树单点修改,区间最值)
- C++学习笔记17