html - Google 站点 HTML 框不允许 css 转换工作

标签 html css transform sites

为什么会出现此错误?

“css 属性转换有错误的值:==>倾斜(-5 度)<== 旋转(-5 度)”

我正在尝试将 HTML 和 CSS 添加到 HTML Box 中,但我不断收到有关 CSS 转换的错误。我希望能够对我的 HTML 中的元素使用这些变换效果。它在 Google Chrome 浏览器的普通 HTML 页面中正常工作。这是我正在试用的网站的链接:https://sites.google.com/site/pghsguidance/home ... HTML 框就在“新生通讯”链接下方。这是我的 HTML 框代码:

<style>
    .box {
        position: relative;
        width: 500px;
        padding: 50px;
        margin: 0 auto;
        background-color: #fff;
        -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
        -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
    }

    .box:before, .box:after {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        width: 40%;
        height: 10px;
        content: ' ';
        left: 12px;
        bottom: 12px;
        background: transparent;
        -webkit-transform: skew(-5deg) rotate(-5deg);
        -moz-transform: skew(-5deg) rotate(-5deg);
        -ms-transform: skew(-5deg) rotate(-5deg);
        -o-transform: skew(-5deg) rotate(-5deg);
        transform: skew(-5deg) rotate(-5deg);
        -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        z-index: -1;
        /***** Transition *****/
        -webkit-transition: visibility 0s linear 0.15s, opacity 0.15s linear;
        -moz-transition: visibility 0s linear 0.15s, opacity 0.15s linear;
        -ms-transition: visibility 0s linear 0.15s, opacity 0.15s linear;
        -o-transition: visibility 0s linear 0.15s, opacity 0.15s linear;
        transition: visibility 0s linear 0.15s, opacity 0.15s linear;
    } 

    .box:after {
        visibility: hidden;
        opacity: 0;
        left: auto;
        right: 12px;
        -webkit-transform: skew(5deg) rotate(5deg);
        -moz-transform: skew(5deg) rotate(5deg);
        -ms-transform: skew(5deg) rotate(5deg);
        -o-transform: skew(5deg) rotate(5deg);
        transform: skew(5deg) rotate(5deg);
    }

    .box:hover:before, .box:hover:after {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }
</style>

<div class="box">
    <p>bam</p>
</div>

帮助将不胜感激!

最佳答案

您应该使用 skewX(5deg)skewY(5deg) 或两者。 skew() 没有简写。

关于html - Google 站点 HTML 框不允许 css 转换工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33161831/

相关文章:

php - 输入字段值在选择不同的下拉菜单选项时更改

c# - 无法获取 Web 浏览器文档的元素

css - 如何并排对齐 p-table 和 p-chart 元素

javascript - 将用 jQuery 编码的图像 slider 转换为纯 JS

c# - XNA 2D 世界在 x 轴上的反射

css - 如何使用css3获得这个?

html - 我正在尝试使用 css 调整图像大小以使其适合移动设备,但它不起作用

jquery - 在 Bootstrap 中停止移动设备上的静态固定滚动条行为

javascript - 如何设置 Google Chrome 语音输入控件的麦克风样式

python - 使用palantir代工厂中的存储库输出.docx文档