gpt4 book ai didi

html - 如何在不同的浏览器中使用形状(多边形)?

转载 作者:行者123 更新时间:2023-11-28 07:24:17 32 4
gpt4 key购买 nike

我正在我的网站上使用 CSS 来制作形状。它在 chrome 中运行良好,但在 mozilla、internet explorer 中打开时,它无法运行。

有人知道怎么解决吗?

这是 fiddle

http://fiddle.jshell.net/dm3qe27o/2/

<div class="index-main-wrapper">
<div class="home-left-shape"></div>
<div class="home-right-shape"></div>
<div style="clear:both;"></div>
</div>

.home-left-shape {
height:100vh;
width:50vw;
float:left;
background-color:#bfb6a5;
background-size:cover;
-webkit-shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%);
shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%);
-webkit-clip-path: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%);
-webkit-shape-margin: 20px;
}
.home-right-shape {
height:100vh;
width:50vw;
float:right;
background-color:#bfb6a5;
background-size:cover;
-webkit-shape-outside: polygon(0% 100%, 100% 0%, 100% 100%, 0% 100%);
shape-outside: polygon(0% 100%, 100% 0%, 100% 100%, 0% 100%);
-webkit-clip-path: polygon(0% 100%, 100% 0%, 100% 100%, 0% 100%);
-webkit-shape-margin: 20px;
}

最佳答案

使用不同的浏览器

-webkit-shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%); -mozila & chrom

-moz-shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%); - mozila

-o-shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%); - 歌剧

-ms-shape-outside: polygon(0% 0%, 0% 0%, 100% 100%, 0% 100%); - Internet Exploler

关于html - 如何在不同的浏览器中使用形状(多边形)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31911238/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com