css

1.普通设置<html>
               <head>
               <style type="text/css">
                 H1{font-size:16pt;color:red}
                 H2{font-size:10pt;color:green}
                 #code1{font-size:16pt;color:red}
                 P.code{font-size:16pt;color:red}
                  .comment{font-size:20pt;color:red}
                 p a{font-size:45;color:yellow}

              </style>
              </head>
               <body>
                  <h2 style="font-size:10pt;background:yellow;font-family:courier">World</h2>
                  <p id="code1">
                  </p>
                  <P class="code">
                   </P>
                   <P class="comment">
                   </P>
                    <p>
              <a name="test">hello</a>
                     </p>
                    <pre>里面可以安照你想要的格式写</pre>
            
2.引进css
   <link REL=stylesheet href="03.css" type="text/css"> 


3.字体属性
   <style type="text/css">
   .font1{font-family:verdana; font-style:italic; font-variant: small-caps;                          font-weight: lighter; font-size:18pt; color:red}
   </style>
  
   <p class="font1">Hello world!</p>

4.链接
<style type="text/css">
/* 我是注释 */
a:link{color:green;text-decoration:none}
a:active{color:blue;text-decoration:none}
a:visited{color:orange;text-decoration:none}
a:hover{color:red;text-decoration:underline}
</style>
</head>

5.鼠标效果

  <div style="font-family:隶书; font-size:24pt; color:green">
   <span style="cursor:hand">手的形状</span><br>
   <span style="cursor:move">移动</span><br>
   <span style="cursor:ne-resize">反方向</span><br>
   <span style="cursor:wait">等待</span><br>
   <span style="cursor:help">求助</span>
  </div>


6.定位属性
<HTML>
 <HEAD>
  <TITLE>定位属性</TITLE>
  <STYLE type=text/css>
   #container1 {POSITION: absolute; TOP: 100px}
   #container2 {VISIBILITY: hidden; POSITION: absolute; TOP: 100px}
   P{FONT-SIZE: 12pt}
  </STYLE>
 </HEAD>
 
 <BODY>
  <P style="FONT-SIZE: 15pt; COLOR: #cc33cc; FONT-FAMILY: 行书体">请选择一幅图片: </P>
  <DIV id=container1>
   <IMG height=280 src="images/sand.jpg" width=185>
   <P style="FONT-SIZE: 12pt; COLOR: #cc9933; FONT-FAMILY: 行书体">名称:大漠</P>
  </DIV>
  <DIV id=container2>
   <IMG height=280 src="images/ocean.jpg" width=185>
   <P style="FONT-SIZE: 12pt; COLOR: #3366cc; FONT-FAMILY: 行书体">名称:大海</P>
  </DIV>
  
  <FORM name=myform>
   <P>
   <INPUT οnclick="container1.style.visibility='visible'; container2.style.visibility='hidden'" type=button value=大漠>
   <INPUT οnclick="container2.style.visibility='visible'; container1.style.visibility='hidden'" type=button value=大海>
   </P>
  </FORM>
 </BODY>
</HTML>
7.多层图片显示

<HTML>
 <HEAD>
  <TITLE>zindex</TITLE>
  <STYLE type=text/css>
   .pile {LEFT: 2in; WIDTH: 3in; POSITION: absolute; TOP: 2in; HEIGHT: 3in}
   .pile1 {LEFT: 3in; WIDTH: 1in; POSITION: absolute; TOP: 2in; HEIGHT: 1in}
  </STYLE>
 </HEAD>
 <BODY>
  <IMG class=pile id=image style="Z-INDEX: 2" src="images/flower.jpg">
  <DIV class=pile id=text1 style="Z-INDEX: 1; COLOR: #ffff33">
   <font size=5 color="red"><b>将覆盖在图片上。 </b></font>
  </DIV>
  <IMG class=pile1 id=image style="Z-INDEX: 3" src="images/mouse.gif">
 </BODY>
</HTML>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值