分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

CSS进阶(十五)font-weight;font-style;font-variant

发布时间:2023-09-06 02:18责任编辑:白小东关键词:CSSstyle
/* 平常用的最多的 */font-weight: normal;font-weight: bold;/* 相对于父级元素 */font-weight: lighter;font-weight: bolder;/* 字重的精细控制 */font-weight: 100;font-weight: 200;font-weight: 300;font-weight: 400;font-weight: 500;font-weight: 600;font-weight: 700;font-weight: 800;font-weight: 900; 

font-weight:400 == font-weight:normal

font-weight:700 == font-weight:bold

lighter和border的解析规则

平时使用的300,400,500时没有显著变化的原因,是缺乏对应字重的字体

font-style

font-style: normal;font-style: italic;//使用当前字体的斜体字体font-style: oblique; //单纯地让文字倾斜

在实际开发的 时候,几乎没有任何理由需要使用 font-style:oblique

font-variant

实现小体型大写字母,两个属性值要么 normal, 要么 small-caps

CSS进阶(十五)font-weight;font-style;font-variant

原文地址:https://www.cnblogs.com/goOtter/p/9821698.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved