[Angular 9] Custom CSS Variables binding
2023-09-14 09:00:48 时间
Html:
<input type="range" value="0" [style.--thumb-rotate]="720 * $any(input.value)/100 + 'deg'" #input (input)="0">
CSS:
input[type="range"]::-webkit-slider-thumb:active {
background-position: 100% 0px;
transform: scale(2) rotateZ(var(--thumb-rotate, 10deg));
}
相关文章
- [Angular 14] Inject() function
- [ngx-formly] Dynamically disable a Form field with Angular Formly
- [Angular] Read Custom HTTP Headers Sent by the Server in Angular
- [AngularJS] Angular 1.3 ngAria - 2
- [Angular] Communicate with Angular Elements using Inputs and Events
- [AngularJS] Lazy loading Angular modules with ocLazyLoad
- Angular Component 实现类,先执行字段初始化,再调用构造函数
- Angular里的按钮事件注册方法一例