标签:style blog color ar java sp div on log
HTML
CSS
1、.html插入.css
<head> <link rel="stylesheet" type="text/css" href="style.css"> </head>
2、调用元素的class:
<div class="div1"></div> <syle> .div1 {margin:auto} <!--或者用下面的--> div.div1 {margin:aotu} </style>
调用元素的id:
<div id="div2"></div> <style> #div2 {margin:10px} </style>
调用某个元素内的元素
<div id="bg"> <ul> <li>a</li> <li>b</li> </ul> </div> <script> #bg ul{margin:10px} </script>
JS
1、.html插入.js
<script src="javascript.js" type="text/javascript"></script>
标签:style blog color ar java sp div on log
原文地址:http://www.cnblogs.com/heyuheitong/p/4024870.html