码迷,mamicode.com
首页 > Web开发 > 详细

CSS样式表

时间:2015-12-24 02:04:41      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

源代码

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>样式表</title>

<link href="Untitled-外部样式.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>你好</p>
<a href="http://www.baidu.com/">百度一下你就知道</a>
<div id="main">今天是星期二</div>
<br />
<p>今天</p><p class="sp">你在</p><p>汉企</p>
<br />
<div class="main">今天是星期二</div>
<br />
</body>
</html>

CSS样式代码

@charset "utf-8";
/* CSS Document */
<style type="text/css">
*
{
    margin:0px;/*注释*/
    padding:0px;
}
body
{
    background-image:url(111.jpg);
    background-repeat:no-repeat;
    background-position:center top;}
p
{
    color:#00F;
    font-size:36px;
    text-decoration:underline;}
p.sp
{
    color:#F00;
    font-size:60px;
    text-decoration:line-through;}
    .main
{
    height:50px;
    width:100%;
    text-align:center;
    border:2px thin red;}
#main
{
    height:50px;
    width:100%;
    text-align:center;
    border:2px thin red;}
a:link
{
    color:#000;
    text-decoration:none;}
a:visited
{
    color:#000;
    text-decoration:none;}
a:hover
{
    color:red;
    text-decoration:underline;}
a:active
{
    color:orange;
    text-decoration:underline;}
</style>

技术分享

 

CSS样式表

标签:

原文地址:http://www.cnblogs.com/Chenshuai7/p/5071741.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!