前端入门:HTML(CSS.字体和字号)

font-size/line-height,font-family是必须写的,前两个如果不设置就是默认值

案例:

源代码:

html部分:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>字体风格和样式简写</title>

    <link rel="stylesheet" href="./font-style.css">

</head>

<body>

    <h1>浠浠呀老师,程序员手速必须要快么?<</h1>

    <p class="p1">如果一个程序员在噼里啪啦的敲键盘,他85%可能是在和产品经理battle,或者在和测试打口水仗,还有10%的概率是在论坛上摸鱼,

        另外5%可能是在和小姐姐聊天!</p>

    <p class="p2">所以工作的时候不需要拼手速?</p>

    <p class="p3">其实,battle 也是工作的一部分。</p>

</body>

</html>

css部分:

h1{

    font-weight: normal;

}

p.p1{

    font-style: normal;

    font-weight: bold;

}

p.p2{

    font-style:italic ;

    font-weight: 700;

}

p.p3{

    /* font-style: oblique;

    font-weight: 100;

    font-variant: small-caps;

    font-size: 30px;

    line-height: 30px;

    font-family: 华文仿宋; */

    font:oblique 100 small-caps 30px 30px 华文仿宋;

}

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值