首页 话题 小组 问答 好文 用户 我的社区 域名交易 唠叨

[分享]css3怎么设置样式

发布于 2024-11-11 15:34:53
0
20

CSS3 可以让我们设置更加丰富多彩的样式,从而让网站更具有吸引力。

/* 设置字体 */
font-family: "Microsoft YaHei", Arial, sans-serif;
font-size: 16px;
font-weight: bold;
color: #333;

/* 设置背景 */
background-color: #f5f5f5;
background-image: url(images/bg.jpg);
background-position: center center;
background-repeat: no-repeat;
background-size: cover;

/* 设置边框 */
border: 1px solid #ccc;
border-radius: 5px;

/* 设置阴影 */
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);

/* 设置渐变 */
background-image: linear-gradient(to bottom right, #00c6ff, #0072ff);

/* 设置动画 */
animation: slideInLeft 1s ease;

/* 设置伸缩布局 */
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;

/* 设置文本属性 */
text-align: center;
text-decoration: none;
text-shadow: 1px 1px #fff;
text-transform: uppercase; 

以上是一些常用的 CSS3 样式设置,通过这些设置,我们可以让网页更加生动、美观、有吸引力。

评论
一个月内的热帖推荐
91云脑
Lv.1普通用户

62849

帖子

14

小组

291

积分

赞助商广告
站长交流