0

我有这段 CSS:

.image-wrap:after {
    content: ' ';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    box-shadow: inset 0px 0px 0px 5px red;
}

我想在 Jquery 中“写”这个。我在:after使用:afterJquery 时遇到问题?请看一下我的完整代码:http: //jsfiddle.net/WpGsx/23/

4

1 回答 1

0

好的,这是插图

http://jsfiddle.net/WpGsx/30/

你可能想检查不同的浏览器

var $wrap = $('.image-wrap');

$wrap.css({
    'box-shadow': 'inset 0px 0px 0px 5px red',
    'position':'absolute',
    'left':'0',
    'top':'0',
    'padding':'5px 5px 0 5px'
});
于 2013-03-27T20:18:18.673 回答