使用CSS修饰常见的网页元素

文字是在网上随便找的,图片需要自己加

<!doctype html>
<html>
    <head>
        <title>标题</title>
        <meta charset="utf-8"/>
        <link href="1.css" rel="stylesheet" type="text/css"/>
    </head>
    <body id="body1">
        <h1>这里是标题,宋体字体</h1>
        <p >任务:创建一个名为<span id = "w1">smaller-image</span>的类选择器,然后用它来改变图片尺寸,使图片仅有<span id="w2">100像素宽。</span> 以上就是如何调整<span id="w3">html网页中</span>图片大小?的详细内容,更多请关注php中文网...爱词霸英语为广大英语学习爱好者提供金山词霸、在线词典、在线翻译、英语学习资料、英语歌曲、英语真题在线测试、汉语查词等服务,爱词霸英语在线查词和在线翻译频道致力...</p>
        <p style="text-align: center; ">
            不同的情况下<span id="dec1">所要求的的图片质量不一样</span>,所以并<span id="dec2">没有固定的压缩标准。</span>不过推荐两个链接:
            <span id="dec3">1. Best Practices for Speeding Up Your Web Site2. ImageOptim ,</span>
            这个是 Mac 下<span class="cc">免费的无损压缩图片的应用</span>,强烈推荐。
        </p>
        <br>
        <p class="l_spac1">
            爱词霸英语为广大英语学习爱好者提供金山词霸、在线词典、在线翻译、英语学习资料、英语歌曲、英语真题在线测试、汉语查词等服务,爱词霸英语在线查词和在线翻译频道致力...
            爱词霸英语为广大英语学习爱好者提供金山词霸、在线词典、在线翻译、英语学习资料、英语歌曲、英语真题在线测试、汉语查词等服务,爱词霸英语在线查词和在线翻译频道致力...
            爱词霸英语为广大英语学习爱好者提供金山词霸、在线词典、在线翻译、英语学习资料、英语歌曲、英语真题在线测试、汉语查词等服务,爱词霸英语在线查词和在线翻译频道致力...
        </p>

        <p class="capitalize" id = "background-color">
            Up to now I have read a lot of BOOKS,for example,mag    azines,novels and storybooks and so on.But one of the books that I like best is My Life Story.It was created(创作bai)by an American writer-Helen Keller(海伦·凯勒)in 1902.She was a blind(盲的),deaf(聋的)and dumb(哑的)person.In the book,she wrote that she had not been able to see,hear or speak since the age of one year and seven months.This unusual thing made her very sad.When she was seven years old,she knew Miss Sullivan(沙利文du),her good teacher.Helen was getting happier every day.Then,Miss Sullivan helped her learn how to write English words.At first,Miss Sullivan wrote some words on Helen's hands with her own fingers again and again.Helen was a very diligent girl.Because of this,she tried as much as possible to remember words.After that,she wrote and published(出版)many famous works.My Life Story is one of them.
        </p>

        <img src="C:UsersdellDesktop111.PNG" class="test3">

        <!-- <div id="box">
            <img src="C:UsersdellDesktop333.jpg">
            <img src="C:UsersdellDesktop333.jpg" class="test11">
            <img src="C:UsersdellDesktop333.jpg" class="test22">
        </div> -->
        <div id="box1"></div>
        <a href="https://www.baidu.com" target="_blank" class="addtocart">baidu</a>
        
    </body>
</html> 
h1{
    font-family: 宋体;
    background-color: orange;
}
p{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
}
#w1{
    font-weight: bold;
    font-size: 30px;
}
#w2{
    font-weight: normal;
    font-size: 30px;
    font-style: italic;
}
#w3{
    font-weight: 50;
    font-size: 30px;
    font-style: oblique;
}
#italic{
    font-style:italic;
}
#dec1{
    text-decoration: underline;
}
#dec2{
    text-decoration: blink;
}
#dec3{
    text-decoration: overline;
}
#dec4{
    text-decoration: line-through;
}
#col1{
    color: aqua;
}
.cc{
    text-decoration: line-through;
    color: aquamarine;
}
#indent2{
    text-indent: 2em;
}
.first-letter{
    float: left;
    font-size: 2em;
    font-weight: bold;
}
.english{
    line-height: 200%;
}
.wd_spac1{
    word-spacing: normal;
}
.wd_spac2{
    word-spacing: -0.5em;
}
.l_spac1{
    letter-spacing: normal;
}
.l_spac2
{
    letter-spacing: -0.25em;
}
.uppercase{
    text-transform: uppercase;
}
.lowercase{
    text-transform: lowercase;
}
.capitalize{
    text-transform: capitalize;
}
.test1{
    border-style: dotted;
    border-color: #996600;
    border- 4px;
    margin: 2px;
}
.test2{
    border-style: dashed;
    border-color: blue;
    border- 2px;
    margin: 2px;
}
.test3{
    border-style: solid dotted dashed double;
    border-color: red green blue purple;
    border- 1px 2px 3px 4px;
    margin: 2px;
}

#box{
    padding: 2px;
     1500px;
    height: 600px;
    border: 2px dashed #99cc33;
}
img.test11{
     30%;
    height: 40%;
}
img.test22{
     150px;
    height: 150px;
}
#background-color{
    background-color: rgb(0, 255, 255);
}
#body1{
    /* background-color: #66ffff; */
    background-image: url(images/555.jpg); 
    /* background-size: cover; */
    /* background-repeat: no-repeat; */
}
#box1{
     800px;
    height: 400px;
    border: 6px dashed #ff3333;
    background-image: url(images/444.jpg);
    background-repeat: no-repeat;
    background-position: center bottom;
}
#box2{
     800px;
    height: 800px;
    border: 6px dashed rgb(0, 255, 255);
    background-image: url(images/222.jpg);
    background-repeat: no-repeat;
    background-position: 50px 100px;
}
a,a:link,a:visited{
    color: #0299aa;
    font-weight: normal;
    text-decoration: none;
}
a:hover{
    text-decoration: underline;
}
a.addtocart{
    display: inline-block;
     80px;
    height: 21px;
    line-height: 21px;
    text-align: center;
    font-size: 1opx;
    font-weight: bold;
    color: #333333;
    background: url();
}
你将不再是道具,而是成为人如其名的人
原文地址:https://www.cnblogs.com/wsl-lld/p/13839078.html