css引用

偶然发现一个不错的css代码引用

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
/* styles.css */

body {
font-family: Arial, sans-serif;
text-align: center;
margin: 0;
padding: 0;
background-color: #f9f9f9;
}

h1 {
margin-top: 20px;
color: #333;
}

form {
margin: 0 auto;
max-width: 400px;
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}

label {
display: block;
margin-bottom: 10px;
text-align: left;
}

input[type="text"] {
width: calc(100% - 20px);
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
}

input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
background-color: #0056b3;
}

调用时使用

1
2
<link rel="stylesheet" type="text/css" href="styles.css">


css引用
http://example.com/2024/04/07/css引用/
作者
Jack Asher
发布于
2024年4月7日
许可协议