首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

css 基础1

2012-11-05 
css 基础一1、链接外部样式。 head title文档标题/title link relstylesheet hrefhttp://www.dhtm

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

热点排行