网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

css样式加粗,css样式文字加粗

css样式表中字体加粗的属性是什么?

CSS字体加粗的方法:

创新互联公司是一家专业提供玛曲企业网站建设,专注与网站设计制作、成都做网站、H5场景定制、小程序制作等业务。10年已为玛曲众多企业、政府机构等服务。创新互联专业的建站公司优惠进行中。

font-weight 属性设置文本的粗细。使用 bold 关键字可以将文本设置为粗体。

例如:

html:

p字体加粗/p

css:

p{

font-weight:blod;

}

css中font样式常用的使用方法:

font-style:规定字体样式

font-weight:规定字体粗细

font-family:规定字体系列

两种方法给字体加粗,一种就是直接用b标签,例如 : b粗/b

或者用css添加样式  div style="font-weight: bold;" 加粗 /div

可以用的值有下面这些。400 等同于 normal,而 700 等同于 bold。

normal   默认值

bold   定义粗体字符

bolder   定义更粗的字符

lighter   定义更细的字符

100

200

300

400

500

600

700

800

900

css怎么加粗

CSS 加粗使用CSS属性单词font-weight:

例子:

.yangshi1{ font-weight:bold}

.yangshi2{ font-weight:600}

font-weight对象值:从100到900,最常用font-weight的值为bold

font-weight参数:

normal : 正常的字体。相当于number为400。声明此值将取消之前任何设置

bold : 粗体。相当于number为700。也相当于b对象的作用

bolder : IE5+ 特粗体

lighter : IE5+ 细体

number : IE5+ 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

CSS样式加粗怎么写?

!DOCTYPE html

html

head

meta charset="utf-8" /

titletest/title

style type="text/css"

ul.titlemenu {

margin: 0;

padding: 0;

}

li.titlemenu {

list-style-type: none;

text-align: center;

border-bottom: 1px #fff solid;

}

a {

font-weight: bolder;

font-size: 14px;

}

a.titlemenu:link,a.titlemenu:visited,a.titlemenu:active {

display: block;

color: #000;

background-color: #fff;

text-decoration: none;

line-height: 50px;

padding-left: 14px;

}

a.titlemenu:hover {

color: #fff;

text-decoration: none;

background-color: #3fa200;

line-height: 50px;

padding-left: 14px;

}

/style

!-- script type="text/javascript" src="../jquery-1.8.0.min.js"/script --

/head

body

ul class="titlemenu"

li class="titlemenu"a class="titlemenu"abc123你/a

/li

/ul

/body

/html

用CSS如何让列表字体变粗?

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的script标签中,输入js代码:

$('td').click(function () {

$('td').css('font-weight', 'normal');

$(this).css('font-weight', 'bold');

});

3、浏览器运行index.html页面,点击“我是A”,此时字体会变粗。

4、再点击“我是B”,此时“我是A”的字体粗度恢复正常,“我是B”的字体变粗。


文章标题:css样式加粗,css样式文字加粗
转载注明:http://bjjierui.cn/article/hoosci.html

其他资讯