CSS样式备忘录

层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。CSS不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。

CSS 能够对网页中元素位置的排版进行像素级精确控制,支持几乎所有的字体字号样式,拥有对网页对象和模型样式编辑的能力。

 

CSS样式备忘录

 

 

line-height:1.5em; /*半个字体大小的间距*/
  text-indent:2em; /*中文段首两个字的缩进*/
  margin:1em 0; /*上下各有0.5em的外边距*/


margin:1em 2em 1em 2em; /*中文两边各缩进两个字*/
text-align: justify; /*两边对齐*/

/*文字字号*/
font-size: 1em;

/*文字居中*/
text-align: center;

/*文字加粗*/
font-weight: bold;

/*中文段左侧有竖线*/
border-top-width: 0px;
  border-bottom-width: 0px;
  border-left-width: 1px;
  border-right-width: 0px;
  border-radius: 0em;
  border-style: solid;
  border-color: #000000;

/*右上角注释*/
sup{
  font-size: 0.7em; /*正文字体大小,默认是16px*/
  line-height: 1em; /*行高1.5em,标准正文字的1.5倍*/
  position: relative;
  top: -1px; /*向上移动5px*/
}


/*超链接去掉下划线*/
a {
  text-decoration: none;
}

/*超链接去掉下划线*/
a href=... style="text-decoration: none;"


/*添加字体*/
@font-face {
  src: url(将此更改为相对路径:OEBPS/楷体_GB2312.ttf);
  font-family: "KaiTi_GB2312";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  }
@font-face {
  src: url(将此更改为相对路径:times.ttf);
  font-family: "Times New Roman";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  }
@font-face {
  src: url(将此更改为相对路径:timesbd.ttf);
  font-family: "Times New Roman";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
  }
@font-face {
  src: url(将此更改为相对路径:timesbi.ttf);
  font-family: "Times New Roman";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
  }
@font-face {
  src: url(将此更改为相对路径:timesi.ttf);
  font-family: "Times New Roman";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
  }

@font-face {
  src: url(将此更改为相对路径:OEBPS/仿宋_GB2312.ttf);
  font-family: "FangSong_GB2312";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  }

.calibre7 {
  display: block;
  line-height:1.5em; /*半个字体大小的间距*/
  text-indent:2em; /*中文段首两个字的缩进*/
  margin:1em 0; /*上下各有0.5em的外边距*/
}

.duokan-footnote-content {
  display: block;
  font-family: "KaiTi_GB2312";
  list-style-image: none;
  list-style-position: outside;
  list-style-type: none;
  text-align: justify; /*两边对齐*/
  margin-bottom: 0.5em;
  margin-left: 2em;
  margin-right: 4em;
  margin-top: 0;
  padding-bottom: 0;
  padding-right: 0;
  padding-top: 0;
  border-top-width: 0px;
  border-bottom-width: 0px;
  border-left-width: 1px;
  border-right-width: 0px;
  border-radius: 0em;
  border-style: solid;
  border-color: #000000;
}

 

附录:css样式大全

https://zhuanlan.zhihu.com/p/109935874

给TA打赏
共{{data.count}}人
人已打赏
科技

PC安装Win11过程中强制联网的解决办法

2025-3-23 21:40:43

悦读

上古神话:一本书读懂中国神话 (全四册合一) (钟毓龙) (mobi+azw3+epub)

2024-5-12 19:18:04

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
有新私信 私信列表
搜索