css 基础一

1、链接外部样式。

<head>
<title>文档标题</title>
<link rel=stylesheet href="http://www.dhtmlet.com/dhtmlet.css" type="text/css">
</head>


特点:格式与代码分离。

2、定义内部样式块对象。

<html>
<head>
<title>文档标题</title>
<style type="text/css">
<!–
body {font: 10px "Arial"}
h1 {font: 15px/17px "Arial"; font-weight: bold; color: maroon}
h2 {font: 13px/15px "Arial"; font-weight: bold; color: blue}
p {font: 10px/12px "Arial"; color: black}
–>
</style>
</head>
<body>


特点:页面内部使用,方便,下载流量会适当减少。

3、内联定义。

<p style="margin-left: 0.5in; margin-right:0.5in">这一行被增加了左右的外补丁<p>


特点:随意、方便。

 

转自:http://www.iteye.com/topic/675248

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值