⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 css0201.htm

📁 网页颜色渐变,可实现网页中背景色的渐变效果
💻 HTM
字号:
<html>
<head>
<title>洪恩在线 - CSS教程</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/pc/pc.css">
<link rel="stylesheet" href="/pub/css/home.css">
<meta name="keywords" content="电脑乐园,电脑,乐园,交互教程,交互,教程,教育">
</head>
<body bgcolor="white" text="black" topmargin="10" leftmargin="0" marginwidth="0" marginheight="10">
<!--顶部开始--> 
<script language="Javascript" src="/pub/js/head.js"></script>
<!--顶部结束--> 
<table width="760" height="20" border=0 cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height=20 class="p1" bgcolor="#E8E8E8" align="left"><img src="/pc/img/blank.gif" width="12" height="8"><font color="#000000"><font color="#FF9966">当前位置</font>:<a href="/default.htm" class="under">洪恩在线</a> 
      -&gt; <a href="/pc/index.htm" class="under">电脑乐园</a> -&gt; CSS教程</font></td>
  </tr>
</table>
<table width="760" border=0 cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td height="15"></td>
  </tr>
</table>
<table width="760" cellspacing="0" border=0 cellpadding="0" align="center">
  <tr> 
    <td width="145" valign="top" bgcolor="#E8E8E8" align="left" style="color:blue" class="p1" height="123"> 
     <br>
      <table width="145" border="0" cellspacing="0" cellpadding="0" bordercolor="#F8AC0E" height="20">
        <tr bgcolor="000099" valign="middle"> 
          <td width="115" align="center" class="p2"><b><font color="#FFFFFF">CSS教程</font></b></td>
          <td height="20" bgcolor="#E8E8E8" width="13"><img src="/pc/img/title_00.gif" width="13" height="20"></td>
          <td height="20" bgcolor="#E8E8E8" width="17">&nbsp;</td>
        </tr>
      </table>
      <p class="p1" style="line-height:17pt" align="left">  <font color="#CC3399">→</font> 
        <a href="css0101.htm">CSS快速入门</a><br>
         <font color="#CC3399">→</font> 怎样编写CSS<br>
         <font color="#CC3399">→</font> <a href="css0301.htm">CSS属性</a><br>
         <font color="#CC3399">→</font> <a href="css0401.htm">CSS定位</a><br>
         <font color="#CC3399">→</font> <a href="css0501.htm">CSS滤镜</a>  <br>
        <br>
      </p><br>
<p align="center" class=p1> <a href=/pc/bin/msg.pl?file_id=k_css target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="请您留言" border="0"><br> 谈谈您的看法</a> 
        <br>
        <script language="javascript">
speak_num="za"
</script>
        <script language="javascript" src=/pc/var/pc_k_css.js>
</script>
        <script language="javascript">
var num=0
if (!isNaN(speak_num)){
	num=speak_num;
}
else{
	num=0
}
document.writeln ("已有")
document.writeln (num)
document.writeln ("条发言")
</script>
</p>
<br>
      <p class="p1" style="line-height:17pt" align="left">&nbsp; </p>
      </td>
    <td width=1 bgcolor=#0586D7 height="123"><img src="/pc/img/blank.gif" width="1" height="1"> 
    </td><td width=15 background="/pc/img/line.gif"><p>&nbsp;</p></td>
    <td valign="top" background="/pc/img/line.gif" width="584" height="123" class="p2"> 
      <p align="center"><b><span class="p3"><br>
        <font color="#3366CC">怎样编写CSS?</font></span></b></p>
      <p align="right" class="p1">&nbsp;&nbsp;&nbsp;</p>
      <hr color=blue size=1>
      <p class="p2" style="line-height:17pt">  从上面的例子中,我们可以看到CSS的语句是内嵌在HTML文档内的。所以,编写CSS的方法和编写HTML文档的方法是一样的。<br>
          您可以用任何一种文本编辑工具来编写。比如Windows下的记事本和写字板、专门的HTML文本编辑工具(Frontpage、Ultraedit等),都可以用来编辑CSS文档。 
        <br>
          那么您可能会问,独立编辑好的CSS文档怎样加入到HTML文档中呢?其实在第一章中的例子里已经介绍了两种方法。<br>
          一种是把CSS文档放到&lt;head&gt;文档中: <br>
          <font color="006666">&lt;style type=“text/css”&gt; …… &lt;/style&gt;</font><font color="#FF0066"> 
        </font><br>
          其中&lt;style&gt;中的“type=‘text/css’”的意思是&lt;style&gt;中的代码是定义样式表单的。 <br>
          另一种方法是把CSS样式表写在HTML的行内,比如下面的代码: <br>
          <font color="006666">&lt;p style=“font-size:14pt;color:blue”&gt;蓝色14号文字&lt;/p&gt;</font><font color="#FF0066"> 
        </font><br>
          这是采用&lt;Style=“ ”&gt;的格式把样式写在html中的任意行内,这样比较方便灵活。   还有一种方法是:把您编辑好的CSS文档保存成“.CSS”文件,然后在&lt;head&gt;中定义。定义的格式是这样的: 
        <br>
          <font color="006666">&lt;head&gt; &lt;link rel=stylesheet href=“style.css”&gt; 
        …… &lt;/head&gt; </font><br>
          我们看到这里应用了一个&lt;Link&gt;,“rel=stylesheet”指连接的元素是一个样式表(stylesheet)文档。一般这里是不需要您改动的。<br>
          而后面的“href=‘style.css’”指的是需要连接的文件地址。您只需把编辑好的“.CSS”文件的详细路径名写进去就可以了。这种方法非常适宜同时定义多个文档。它能使多个文档同时使用相同的样式,从而减少了大量的冗余代码。 
      </p>
      <p class="p2" style="line-height:17pt">  本章主要介绍了编写CSS的方法以及如何把作好的CSS文档与HTML结合起来运用。您可以根据自己编写的HTML代码的结构、长度来选择用哪一种方法将CSS与之结合。<br>
          下一章我们将进入CSS的具体知识的学习,我们将先从最基本的属性开始讲起。 </p>
      <hr color=blue size=1>
      <p class="p1" align="right"><a href="css0101.htm">上一节</a> <a href="css0301.htm">下一节</a>&nbsp;&nbsp;&nbsp;</p>
      <p>&nbsp;</p><br>
<p align="center" class=p1> <a href=/pc/bin/msg.pl?file_id=k_css target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="请您留言" border="0"><br> 谈谈您的看法</a> 
        <br>
        <script language="javascript">
speak_num="za"
</script>
        <script language="javascript" src=/pc/var/pc_k_css.js>
</script>
        <script language="javascript">
var num=0
if (!isNaN(speak_num)){
	num=speak_num;
}
else{
	num=0
}
document.writeln ("已有")
document.writeln (num)
document.writeln ("条发言")
</script>
</p>
<br>
    <p>&nbsp;</p></td><td width=15 background="/pc/img/line.gif"><p>&nbsp;</p></td>
  </tr>
</table>
<!--底部开始--> 
<script language="Javascript" src="/pub/js/foot.js"></script>
<!--底部结束-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -