字体样式、文本样式、边框样式、背景样式、超链接样式

1、字体样式

  font-size: 20px;     设置字体大小

  font-weight: bold;    设置变粗

  font-weight: lighter; 设置变细

  font-style: italic;    设置斜体

  color: yellowgreen; 设置颜色

2、文本样式

  text-decoration: underline;  设置字体下划线

  text-decoration:line-through; 设置字体删除线

  text-decoration: overline;    设置字体顶划线

  text-decoration: none   取消下划线

  text-transform: lowercase;  全部转小写字母

  text-transform: uppercase;  全部转大写字母

  text-align: center;   设置文本对齐方式

  text-align: right;   设置文本对齐方式

  text-indent: 2em;   设置首行缩进,空两个字符

  text-indent: 20px;  设置首行缩进

  line-height: 50px;  设置行高

3、边框样式

  border-top: 10px solid yellow;设置边框上边框

  border-right: 10px dashed green;设置右边框

  border-bottom: 10px dotted blue;设置下边框

  border-left: 10px double pink;设置左边框

4、背景样式

  background-color: #DDFB56;设置背景颜色

  background-repeat: no-repeat;不平铺设置显示方式

  background-repeat: repeat-x;横向平铺

  background-repeat: repeat-y;纵向平铺

  background-repeat: repeat;都平铺

  background-attachment: fixed;是否随内容滚动  固定定位

  background-image:url(../img/bj.jpg);   显示图片背景

  background-position: -247px -140px;  显示图片选择的固定位置

5、超链接样式
#a1:link{
    text-decoration: none;
    color: blue;  
}设置未访问时的样式

#a1:visited{
    color: pink;   
}访问后的样式

#a1:hover{
    color:yellow;
}设置鼠标放上去时的样式

#a1:active{
    color:green;
}设置鼠标点击时的样式

#d1:hover{
    background: green;
    cursor: pointer;鼠标放上时变小手
}

 

posted @   天真~  阅读(361)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 25岁的心里话
点击右上角即可分享
微信分享提示