更改大小调整器的属性通过CSS

时间:2019-04-02 08:07:28

标签: html css html5

我有一个可通过CSS调整大小的div。

HTML

<div id="resize">
  <img src="{{env.assets_url}}assets/images/minified_signhere.png" [hidden]="!isNameNull(sign.name)" [attr.id]="'sign-img' + myindex">
  <img src="{{env.assets_url}}assets/images/minified_signhere_dim.png" [attr.id]="'dimimg' + myindex" [hidden]="isNameNull(sign.name)">
  <div style="position: absolute;z-index: 1000;left: 100%;" class="signbtns">
  <span style="font-size: 17px; margin-bottom: 5px" class="fa fa-trash float-right change-cursor" aria-hidden="true" (click)="deleteSign(myindex)"
  data-toggle="tooltip" title="Click to delete the signature."></span>
  <span style="font-size: 17px;" class="fa fa-pencil float-right change-cursor" (click)="editSign(myindex)" aria-hidden="true"
  data-toggle="tooltip" title="Click to edit the signature."></span>
  </div>
</div>

以下是 CSS

#resize {
  display: flex;
  resize: both;
  overflow:auto;
}
::-webkit-resizer {
  background-color: red;
  cursor: ew-resize;
}

div正在正确调整大小。我想自定义大小调整器的背景颜色,但是::-webkit-resizer似乎不起作用。

1 个答案:

答案 0 :(得分:0)

您更改#resize的颜色,而不是::-webkit-resizer的颜色。