2014-01-11 95 views
0

我不能在tidesdk做出頭的CSSTidesdk不起作用CSS

我試圖做一個css圈子裏,我使用的1.3.1-β,但它不工作,我不不知道我做錯了什麼。

你能幫我嗎?

<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應用

編輯:

我發現這個老方法做模糊,這不是傳統的,但它看起來像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; } 

回答

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

+0

它看起來像TideSDK不接受-webkit風格...或css3方法... – mackiur

+0

你是對的,一些方法不能正常工作,但這個示例工作在tidesdk應用程序沒有問題。 – kgd

+0

omg你是對的,thx – mackiur