jQuery CSS方法

html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>jquery</title>
		<script type="text/javascript" src="js/jquery-3.0.0.min.js"></script>
		<script type="text/javascript" src="js/try.js" ></script>
		
	</head>
	<body>
		<div></div>
	</body>
</html>

  js

$(document).ready(function(){
   $("div").css({
   	 width:"100px",
   	 height:"100px",
   	 backgroundColor:"blue"
   	});
     
 });

  效果:

posted @ 2017-09-21 19:17  1点  阅读(140)  评论(0编辑  收藏  举报