2013-08-29 136 views
1

我使用了CSS3工具包來生成代碼,但是當我將其粘貼到編輯器中時,它不返回形狀,事實上,它不會返回屏幕上的任何內容。有人可以發現我出錯了,請。它與css文件如何鏈接無關,因爲它適用於我的其他css代碼。我用App Store購買的CSS3工具包生成的這個特定代碼不起作用。CSS代碼不起作用

HTML:

<!DOCTYPE HTML> 
<html> 
    <head> 
     <link rel="stylesheet" type="text/css" href="indexcss.css"> 
     <script type="text/javascript" href="dist/js/bootstrap.js"></script> 
    </head> 
    <body> 
     <div class="ToolKitStyle"></div> 
    </body> 
</html> 

CSS:

.ToolKitStyle{ 
    background-color: #2EC0FE; 
    -moz-border-radius: 34px; 
    -webkit-border-radius: 34px; 
    border-radius: 34px; 
    -moz-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    -webkit-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    background-image: -o-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -moz-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -webkit-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -ms-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
} 

回答

2

你需要在你的CSS

.ToolKitStyle{ 
    background-color: #2EC0FE; 
    -moz-border-radius: 34px; 
    -webkit-border-radius: 34px; 
    border-radius: 34px; 
    -moz-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    -webkit-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    background-image: -o-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -moz-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -webkit-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -ms-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    width:100px; 
    height:100px; 
} 
+0

謝謝,它的奇怪爲什麼沒有把寬度和高度放入代碼中。有效。 :] – Umz15

1

你的JS添加寬度和高度不正確鏈接。使用srchref

<script type="text/javascript" src="dist/js/bootstrap.js"></script> 

至於你的CSS問題 -

你沒有任何內容,這就是爲什麼你的CSS不會出現工作。

這裏是與高度,寬度定義

DEMO http://jsfiddle.net/kevinPHPkevin/73t6R/

+0

誰downvoted - 請解釋,如果你downvote一個答案,至少有正義評論 – Vector

+0

感謝您的帖子,但這不是問題。它與href無關,我沒有寬度和高度 – Umz15

1

你需要要麼把裏面的東西,或設置寬度/高度: http://jsfiddle.net/2qyEP/

.ToolKitStyle{ 
    width: 200px; 
    height: 200px; 
    background-color: #2EC0FE; 
    -moz-border-radius: 34px; 
    -webkit-border-radius: 34px; 
    border-radius: 34px; 
    -moz-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    -webkit-box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    box-shadow:inset 0px 4px 9px rgba(0,0,0,1); 
    background-image: -o-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -moz-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -webkit-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: -ms-linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
    background-image: linear-gradient(90deg , rgb(0,4,5) 0%, rgb(246,107,255) 100%); 
}