:root选择器选择文档的根元素(始终为<html>)。
语法:
$(":root")
实例
选择根元素:
$(document).ready(function(){ $(":root").css("background", "lightgreen"); });测试看看‹/›
:root选择器选择文档的根元素(始终为<html>)。
$(":root")
选择根元素:
$(document).ready(function(){ $(":root").css("background", "lightgreen"); });测试看看‹/›