CSS学习记录——自制网页娱乐

学了好多东西了,所以自己也制作了一个简单粗糙的网页。

无论学多学少,只有多多联系多多实践,才能做出更好的作品。

应该简单用到了所有我学到的东西,这个时候才会感觉自己学到的东西还是太少了,能发挥的空间有限。

放一下自己制作的效果图吧。

 

 

 

 

 

 

 

 

 

 

 

在button按钮上,自己还加入了伪类hover,鼠标移动此处字体会变深。

页面的颜色参考了网上一个教学视频,感觉这个颜色看起来更舒服一些。

最后,放上源码。

<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <title>My first website.</title>
    <style>
        body{
            font-family: Arial, Helvetica, sans-serif;
            background:rgb(58,58,58);
            color: white;
           text-align: center;
           line-height: 40px;
        }
        h1{
            color: rgb(0,183,255);
            
        }
        h2{
            color:rgb(158, 158,158);
        }
        button{
            background: gray;
            border: none;
            color:whitesmoke;   
        }
        button:hover{
            color:rgba(55, 76, 95, 0.651);
        }
    </style>
</head>
<body>
    <h1>This is my first website.</h1>
    <h2>Who am I ?</h2>
    <p>I am a web learner and I am interested in computer.</p>
    <button>Click here to learn more!</button>
</body>
</html>

 

posted @ 2020-03-08 11:02  墩墩蹲  阅读(172)  评论(0)    收藏  举报