css个人主页源代码

admin 轻心小站 关注 LV.19 运营
发表于前端技术学习版块 css,教程

最近我学习了CSS,做了一个个人主页,并分享一下源代码。源代码如下: <html> <head> <title>我的

最近我学习了CSS,做了一个个人主页,并分享一下源代码。源代码如下:

<html>
    <head>
        <title>我的个人主页</title>
        <style>
            body {
                background-color: #f2f2f2;
                font-family: Arial, sans-serif;
            }
            h1 {
                text-align: center;
                color: #333333;
                margin-top: 50px;
            }
            p {
                text-align: center;
                font-size: 20px;
                color: #666666;
                margin-top: 20px;
            }
            img {
                display: block;
                margin-left: auto;
                margin-right: auto;
                margin-top: 50px;
            }
            a {
                display: block;
                text-align: center;
                color: #008CBA;
                margin-top: 30px;
            }
        </style>
    </head>
    <body>
        <h1>欢迎来到我的个人主页</h1>
        <img src="profile.png" alt="个人头像" width="200">
        <p>我是一名前端工程师,热爱web开发,同时也喜欢游泳和旅行。</p>
        <a href="https://github.com/username">我的Github</a>
    </body>
</html> 

以上是我个人主页的源代码,代码中使用了许多CSS的样式,如文字居中、背景颜色、字体等等,以及图片位置居中、链接样式等。通过修改这些样式,你也可以自己设计出一个属于自己的个人主页。

文章说明:

本文原创发布于探乎站长论坛,未经许可,禁止转载。

题图来自Unsplash,基于CC0协议

该文观点仅代表作者本人,探乎站长论坛平台仅提供信息存储空间服务。

评论列表 评论
发布评论

评论: css个人主页源代码

粉丝

0

关注

0

收藏

0

已有0次打赏