css样式使用实例

//css样式的书写
//元素ID

#tb1{width:100%;height:80px;background-color:#FFD700;padding:4px;font-family:verdana,tahoma;font-weight:bold;}
#tb2{width:100%;padding:4px;font-family:verdana,tahoma;margin:12px 0px 0px 0px;background-color:#EEEEEE;font-weight:bold;}
//类
.test{cursor:hand;
    border-right: white thin inset;
    border-top: black thin inset;
    border-left: black thin inset;
    border-bottom: white thin inset;  
    }
.post1
{
 cursor:move; background:red; color:Navy; border-right: black thin inset;
}
//元素
body
{
 background-color:Gray:
}


//css样式的运用
<html>
<head runat="server">
    <title>无标题页</title>
    //引入css样式文件
    <link type ="text/css" rel = "stylesheet"  href = StyleSheet.css />
</head>
//样式元素的应用,元素名字相同自动套用
<body>
    <form id="form1" runat="server">
    <div>
        //样式元素ID的应用
        <table id = "tb1" border = 1; type = "font-size;13pt; align;center;">
            <tr>
                //自己使用css样式style=样式
                <td style="width: 134px; height: 19px">dsfdf</td>
            </tr>
        </table>
    </div>
        <table id = "tb2" style="width: 168px">
            <tr>
                //样式类的应用
                <td class = "post1">啊啊啊啊啊啊啊啊</td>
            </tr>     
        </table>
    </form>
</body>
</html>

转载于:https://www.cnblogs.com/salonliudong/archive/2007/02/28/659052.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值