css里边字体宽度怎么写

html-css07

css里边字体宽度怎么写,第1张

宽度???是字间距?字间距letter-spacing: normal数值

对齐text-align: justify(两端对齐) left(左对齐) right(右对齐) center(居中)

缩进text-indent: 数值px

垂直对齐vertical-align: baseline(基线) sub(下标) super(下标) toptext-topmiddlebottomtext-bottom

词间距word-spacing: normal数值

空格white-space: pre(保留) nowrap(不换行)

显示display:block(块) inline(内嵌) list-item(列表项) run-in(追加部分) compact(紧凑) marker(标记) tableinline-tabletable-raw-grouptable-header-grouptable-footer-grouptable-rawtable-column-grouptable-columntable-celltable-caption(表格标题)

需要准备的材料分别有:电脑、浏览器、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”的字体变粗。