鱼C论坛

 找回密码
 立即注册
查看: 3469|回复: 2

[已解决]字体大小都没有变化

[复制链接]
发表于 2017-8-26 18:15:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
<!doctype html>
<html>
        <head>
                        <meta charset="utf-8">
                        <title>欢迎来到HTML世界</title>
                        <style type="text/css">
                                html,body{
                                        height: 100%;
                                        color: #FF0088;
                                        font-family: sans-serif;

                                       
                                }
                                body{
                                                background: url(H_0334.jpg) 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: 78px;
                                                        margin-bottom: 22px;
                                                }
                                                p{
                                                        font-size: 33px;
                                                        margin-bottom: 22px;
                                                }
                                                a{
                                                        font-size: 88px;
                                                        background: #33FFFF;
                                                        color: #999;
                                                        border: 1px solid #33FFF;
                                                        border-radius: 10px;
                                                        padding: 10px 66px;
                                                        text-decoration: none;
                                                       
                                                }

                                }
                        </style>
        </head>
        <body>
                <div id="container">
                        <h1>我爱我家</h1>
                        <p>www.FishC.com -让编程改变世界</p>
                        <a href="http://bbs.fishc.com">传送门</a>
                </div>

        </body>
</html>
最佳答案
2017-8-26 18:58:29
在对比下:
2017-08-26_185708.png
  1. <style type="text/css">
  2.                                 html,body{
  3.                                         height: 100%;
  4.                                         color: #FF0088;
  5.                                         font-family: sans-serif;

  6.                                        
  7.                                 }
  8.                                 body{
  9.                                                 background: url(H_0334.jpg) center center;
  10.                                                 background-size:  cover;
  11.                                                 margin: 0;
  12.                                                 padding: 0;
  13.                                                 position: relative;
  14.                                                 
  15.                                 }
  16.                                 #container{
  17.                                                 width: 100%;
  18.                                                 text-align: center;
  19.                                                 position: absolute;
  20.                                                 top: 50%;
  21.                                                 transform: translateY(-50%);
  22.                                                                 }
  23.                                                 h1{
  24.                                                         font-size: 78px;
  25.                                                         margin-bottom: 22px;
  26.                                                                                                 }
  27.                                                 p{
  28.                                                         font-size: 33px;
  29.                                                         margin-bottom: 22px;
  30.                                                 }
  31.                                                 a{
  32.                                                         font-size: 88px;
  33.                                                         background: #33FFFF;
  34.                                                         color: #999;
  35.                                                         border: 1px solid #33FFF;
  36.                                                         border-radius: 10px;
  37.                                                         padding: 10px 66px;
  38.                                                         text-decoration: none;
  39.                                                         
  40.                                                 }
  41.                         </style>
复制代码
QQ图片20170826181535.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2017-8-26 18:58:29 | 显示全部楼层    本楼为最佳答案   
在对比下:
2017-08-26_185708.png
  1. <style type="text/css">
  2.                                 html,body{
  3.                                         height: 100%;
  4.                                         color: #FF0088;
  5.                                         font-family: sans-serif;

  6.                                        
  7.                                 }
  8.                                 body{
  9.                                                 background: url(H_0334.jpg) center center;
  10.                                                 background-size:  cover;
  11.                                                 margin: 0;
  12.                                                 padding: 0;
  13.                                                 position: relative;
  14.                                                 
  15.                                 }
  16.                                 #container{
  17.                                                 width: 100%;
  18.                                                 text-align: center;
  19.                                                 position: absolute;
  20.                                                 top: 50%;
  21.                                                 transform: translateY(-50%);
  22.                                                                 }
  23.                                                 h1{
  24.                                                         font-size: 78px;
  25.                                                         margin-bottom: 22px;
  26.                                                                                                 }
  27.                                                 p{
  28.                                                         font-size: 33px;
  29.                                                         margin-bottom: 22px;
  30.                                                 }
  31.                                                 a{
  32.                                                         font-size: 88px;
  33.                                                         background: #33FFFF;
  34.                                                         color: #999;
  35.                                                         border: 1px solid #33FFF;
  36.                                                         border-radius: 10px;
  37.                                                         padding: 10px 66px;
  38.                                                         text-decoration: none;
  39.                                                         
  40.                                                 }
  41.                         </style>
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2017-8-26 21:10:18 | 显示全部楼层

谢谢,代码放错地方了,已改正
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-20 14:15

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表