Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
chặn > phần mềm > dom > setCssTransform
Đặt thuộc tính biến đổi CSS trên một phần tử. Hàm này thiết lập các phiên bản có tiền tố không phải của nhà cung cấp và có tiền tố của nhà cung cấp để tương thích ngược với các trình duyệt cũ. Xem https://caniuse.com/#feat=transforms2d
Chữ ký:
export declare function setCssTransform(element: HTMLElement | SVGElement, transform: string): void;
Tham số
Thông số |
Loại |
Mô tả |
yếu tố |
HTMLElement | SVGElement |
Phần tử mà phép biến đổi CSS sẽ được áp dụng. |
biến đổi |
string |
Giá trị của thuộc tính transform CSS. |
Trường hợp trả lại hàng:
void
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["The `setCssTransform` function applies CSS transforms to HTML or SVG elements, ensuring compatibility with various browsers."],["It takes the element and the desired transform string as input and sets the necessary CSS properties for the element."],["This function improves cross-browser compatibility for CSS transforms by setting both vendor-prefixed and non-prefixed versions of the `transform` property."],["It directly modifies the element's style and does not return any value."]]],["The `setCssTransform()` function applies a CSS transform to an HTML or SVG element. It accepts two parameters: `element`, the target element for the transformation, and `transform`, a string representing the desired CSS transform value. It sets both vendor-prefixed and non-prefixed CSS transform properties to ensure compatibility across various browsers. This function does not return any value.\n"]]