怎样在html应用样式表,html – 如何仅将CSS样式应用于文本

CSS大师Chris Coyier有一篇关于CSS-Tricks

listing several methods to solve this的文章.一种方法是带有box-shadow的方法.它已经被提到作为答案,但它需要更多的爱在现代Firefox :)工作.

.multi-line-padded {

background: black;

color: white;

/* For the top and bottom padding */

padding: 0.5em 0;

/* Text height (1.0) + compensate for padding (0.5 * 2) */

line-height: 2;

/* For the left and right padding */

/* Vendor prefixes FIRST */

-webkit-box-shadow: 1em 0 0 black, -1em 0 0 black;

-moz-box-shadow: 1em 0 0 black, -1em 0 0 black;

box-shadow: 1em 0 0 black, -1em 0 0 black;

/* Firefox defaults to `box-decoration-break: split`, we need `clone` */

box-decoration-break: clone;

}

You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder.

Samuel L. Ipsum

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值