css 去掉文本框阴影_CSS文本阴影和框阴影效果(带有示例)

css 去掉文本框阴影

With CSS3 you can create two types of shadows: text-shadow (adds shadow to text) and box-shadow (adds shadow to other elements).

使用CSS3,您可以创建两种类型的阴影: text-shadow (向文本添加阴影)和box-shadow (向其他元素添加阴影)。

CSS3文字阴影 (CSS3 Text Shadow)

The text-shadow property can take up to four values:

text-shadow属性最多可以包含四个值:

  • the horizontal shadow

    水平阴影
  • the vertical shadow

    垂直阴影
  • the blur effect

    模糊效果
  • the color

    颜色
例子: (Examples:)

Normal text shadow

普通文字阴影

h1 {
text-shadow: 2px 2px 5px crimson;
}

Glowing text effect

发光文字效果

h1 {
text-shadow: 0 0 4px #00FF9C;
}
多个阴影 (Multiple Shadows)

To achieve this, you simply add a comma between two (or more) sets of values:

为此,您只需在两组(或更多组)值之间添加一个逗号:

h1 {
	color: white;
	text-shadow: 0 0 3px #F10D58, 0 0 7px #4578D5;
}

CSS3盒子阴影 (CSS3 Box Shadow)

The box-shadow property can take up to six values:

box-shadow属性最多可以包含六个值:

  • (optional) the inset keyword (changes the shadow to one inside the frame)

    (可选) inset关键字(将阴影在帧内更改为一个)

  • the horizontal shadow

    水平阴影
  • the vertical shadow

    垂直阴影
  • the blur effect

    模糊效果
  • the spreading

    传播
  • the color

    颜色
例子: (Examples:)
.first-div {
	box-shadow: 1px 1px 5px 3px grey;
}

.second-div {
	box-shadow: 0 0 5px 1px lightgrey;
}

.third-div {
	box-shadow: inset 0 0 15px 5px rgba(0,0,0,0.75);
}
更多信息: (More Information:)

翻译自: https://www.freecodecamp.org/news/css-text-shadow-and-box-shadow-examples/

css 去掉文本框阴影

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值