【HTML】CSS基础学习之背景边框文字文本的学习

admin 2022年1月10日03:31:28评论16 views字数 1135阅读3分47秒阅读模式

css背景文本框使用代码及注释

demo3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"> <!--字符集 -->
<title>demo3</title>
<!--背景颜色 -->
<style>
body{
/*
background-image: url(1.jpg); 图片背景
background-repeat: no-repeat; 背景不重复
background-size: 200px; 图片像素大小
background-attachment: fixed; 图片固定于页面
background-position: center top; 图片显示中间顶部
*/

/*简写方式*/
/*
background: url(1.jpg) no-repeat fixed center top;
*/
font-family: "微软雅黑" arial;
font-size: 22px;
color: #808080;
font-weight: bold;
font-variant: small-caps;

}

/*边框*/
.div1{
width: 400px;
height: 400px;

/*
border-width: 10px;
border-color: red; */
/*border-style: double ridge inset outset; */

border-left: solid;
border-right: double;
border-top: solid;
border-bottom: double;
text-align: center;
}

.div1 p{
line-height: 30px;
letter-spacing: 10px;
}

p{
text-indent: 20px;
text-decoration: line-through;

}

</style>
</head>
<body>
<!--边框 -->
<div class="div1">
div1
<p>
asdadadsadasdasdasd
asdadadsadasdasdasd
asdadadsadasdasdasd
asdadadsadasdasdasd
asdadadsadasdasdasd
</p>
</div>
<p>this is my heart</p>
</body>
</html>

我的个人博客

孤桜懶契:http://gylq.github.io

FROM:gylq.gitee Author:孤桜懶契

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月10日03:31:28
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【HTML】CSS基础学习之背景边框文字文本的学习https://cn-sec.com/archives/729961.html

发表评论

匿名网友 填写信息