sách gpt4 ăn đã đi

css - 变换 :before or :after item

In lại 作者:技术小花猫 更新时间:2023-10-29 11:28:51 31 4
mua khóa gpt4 giày nike

有没有办法将转换应用到插入了 :before 的元素上?

以下方法无效,但我愿意接受其他解决方案。

.itemclass:before {
content: "➨";
transform: rotate(30deg);
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Safari and Chrome */
}

câu trả lời hay nhất

转换不能应用于非替换的 nội tuyến 元素。添加:

display:inline-block;

Demo

旁注:尽管这不适用于此用例,tuyệt đối/fixed 定位将不再需要 trưng bày属性,因为这些属性会被自动视为 display:block

此外,检查 transformable element 的定义:

A transformable element is an element in the HTML namespace which is either a block-level hoặc atomic inline-level element, or whose ‘trưng bày’ property computes to ‘hàng bàn’, ‘nhóm-hàng-bảng’, ‘nhóm-tiêu-đề-bảng’, ‘nhóm chân trang bảng’, ‘ô bảng’, or ‘table-caption’; or an element in the SVG namespace (see [SVG11]) which has the attributes ‘biến đổi’, ‘patternTransform’ or ‘gradientTransform’.

关于css - 变换 :before or :after item,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16108346/

31 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress