Как удалить стиль преобразования в перетаскиваемом элементе?CSS

Разбираемся в CSS
Ответить
Anonymous
 Как удалить стиль преобразования в перетаскиваемом элементе?

Сообщение Anonymous »


Using the example from CDK drag and drop, I want to add a preview of the dragged element with left and top positions without the transform style.
HTML
I can only be dragged within the dotted container Preview the dragged element TypeScript import {Component} from '@angular/core'; import {CdkDrag} from '@angular/cdk/drag-drop'; /** * @title Drag&Drop boundary */ @Component({ selector: 'cdk-drag-drop-boundary-example', templateUrl: 'cdk-drag-drop-boundary-example.html', styleUrls: ['cdk-drag-drop-boundary-example.css'], standalone: true, imports: [CdkDrag], }) export class CdkDragDropBoundaryExample {} Current state When you drag the element you have this div in DOM

I can only be dragged within the dotted container Expected result When you drag the element and click the preview button it should open the preview element which looks like this.

Now I can't be dragged, sorry Meaning the transform style should be replaced with left and top positions.


Источник: https://stackoverflow.com/questions/766 ... le-element
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»