gpt4 book ai didi

css - Tidesdk 不支持 CSS

转载 作者:行者123 更新时间:2023-11-28 11:33:00 26 4
gpt4 key购买 nike

我不能在 tidesdk 中使用 css 做一些事情

我尝试做一个 css 圆圈,我使用的是 1.3.1-beta,但它不起作用,我不知道我做错了什么。

你能帮帮我吗?

<html>
<head>
<title>Sample</title>
<link href="style.css" type="text/css" rel="stylesheet" media="screen" />
</head>
<body>

<div id="advanced" class="circle"></div>

</body>

</html>

我用这个

.circle {
border-radius: 50%;
display: inline-block;
margin-right: 20px;
}

#advanced {
width: 200px;
height: 200px;
background-image: -moz-radial-gradient(45px 45px 45deg, circle cover, yellow 0%, orange 100%, red 95%);
background-image: -webkit-radial-gradient(45px 45px, circle cover, yellow, orange);
background-image: radial-gradient(45px 45px 45deg, circle cover, yellow 0%, orange 100%, red 95%);
-webkit-animation-name: spin;
-webkit-animation-duration: 3s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: spin;
-moz-animation-duration: 3s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-ms-animation-name: spin;
-ms-animation-duration: 3s;
-ms-animation-iteration-count: infinite;
-ms-animation-timing-function: linear;
}

我在 chrome 中使用了这个,但在 tidesdk 应用程序中没有用

编辑:

我发现这个老办法做blur了,不是很常规,但是貌似TideSDK不支持css3 =(

HTML:

<div id="container">
<div />
<div class="blur" />
</div>

CSS:

#container{ overflow: hidden; position: relative; width: 200px;
height: 200px;}
#container div{
position: absolute;
left: 0;
top: 0;
z-index: 0;
width: 200px;
height: 200px;
border-radius: 40px;
background: orange;
}
#container div.blur:hover{opacity: 0.6; background: white;}
#container div.blur{opacity: 0; }

最佳答案

似乎 tideSDK 在百分比边框半径和新的渐变语法 -webkit-radial-gradient 方面存在问题。我建议您对渐变使用旧语法。您可以在下面找到工作代码示例。根据需要修改颜色和颜色位置。

.circle {
-webkit-border-radius: 100px;
display: inline-block;
margin-right: 20px;
}

#advanced {
width: 200px;
height: 200px;
background: -webkit-gradient(radial, 40% 40%, 20, 50% 50%, 250, from(yellow), to(red));
}

有关-webkit-gradient 语法的更多信息,请阅读this article .

关于css - Tidesdk 不支持 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21057109/

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