html页面中写css样式基本格式

<html><head>

<style type="text/css">
<!--
.style1 {font-family: "隶书"}

div {background:#70db93}

#style2{
    font-family:'隶书';
    font-size: 76px;
    color:#000000;}
-->

/*css单行注释符号的写法*/

/*

*css多行注释符号的写法

*/
</style>

</head>

 

<body>

<span class="style1">类样式</span>

<span id="style2">ID样式</span>

<div>标签样式</div>

 

<script>

//放在后面,程序顺序执行的时候,否则会报找不到对象的错误!

document.getElementById("style2").style.cursor = 'pointer';

document.getElementById("style2").style.color="#FF0000";

</script>

</body></html>

posted @ 2013-03-27 09:28  全新时代-小小程序员大梦想  阅读(519)  评论(0编辑  收藏  举报