试图改变文字的颜色

时间:2017-10-29 18:01:12

标签: css

我正在尝试将我网站上某个项目的原始销售价格的颜色更改为红色。

我尝试按如下方式更改CSS:

.saso-was-price {
    text-decoration: line-through;
    text-decoration-color: #FF0000;
    font-size: 14px;
    opacity: 0.8;
}

但是,原价的文字仍为黑色。

有人可以告诉我上面的代码是否有错误,或者我是否需要在其他地方更改颜色?

非常感谢。

1 个答案:

答案 0 :(得分:0)

使用此代码:

    @DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}")
    @Timed
    @Secured({AuthoritiesConstants.ADMIN, AuthoritiesConstants.MEMBER})
    public ResponseEntity<Void> deleteUser(@PathVariable String login) {
        log.debug("REST request to delete User: {}", login);
        boolean hasAuthorityMember = false;
        boolean hasAuthorityAdmin = false;
        hasAuthorityMember = SecurityContextHolder.getContext().getAuthentication().getAuthorities().contains(AuthoritiesConstants.MEMBER);
        hasAuthorityAdmin = SecurityContextHolder.getContext().getAuthentication().getAuthorities().contains(AuthoritiesConstants.ADMIN);
        if(hasAuthorityAdmin) {
            // delete user
            userService.deleteUser(login);
        } else {
            if(hasAuthorityMember) {
                // delete user if it is a student
                if(userService.getAuthorities().size()==1 && userService.getAuthorities().contains(AuthoritiesConstants.STUDENT)) {
                    userService.deleteUser(login);
                }
            }
        }
        return ResponseEntity.ok().headers(HeaderUtil.createAlert( "userManagement.deleted", login)).build();
    }