|
10鱼币
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>标题</title>
- <style type="text/css">
- html,body{
- height: 100%;
- color: #FF0088;
- font-family: sans-serif;
- }
- body{
- background: url(img/1605698767689.jpeg) center center;
- background-size: cover;
- margin: 0;
- padding: 0;
- position: relative;
- }
-
- #container{
- width: 100%;
- text-align: center;
- position: absolute;
- top:50%;
- transform: translateY(-50%);
- }
- h1{font-size: 66px;
- margin-bottom: 22px;
- }
- p1{
- font-size: 33px;
- margin-bottom: 22px;
- }
- a{
- font-size: 55px;
- color: #ffaaff;
- border:2px solid #00FFFF
- border-radius: 5px
- font-size: 20px;
- background:#aaffff;
- text-decoration: none;
- padding: 10px 15px
- }
- </style>
- </head>
- <body>
- <div id="container">
- <div>
- <h1>我爱鱼C</h1>
- <p1>WWW.FishC.com-让编程改变世界</p1>
- <a href="https://fishc.com.cn"target="_blank"><br>传送门OvO</a>
- </div>
- </body>
- </html>
复制代码
padding是内边距的
你上面已经设置了居中,有了左边距之后,左边多出来的部分就会被挤到上一行
应该是这样的 
|
-
最佳答案
查看完整内容
padding是内边距的
你上面已经设置了居中,有了左边距之后,左边多出来的部分就会被挤到上一行
应该是这样的
|