我有創建一英里的代碼。現在我想要一個從0級到12級的滑動條,並且在更改此欄值時,我想將此笑容轉換爲悲傷。使用css/html/javascript將笑臉轉換成悲傷
div.smileyface {
\t width: 300px;
\t height: 300px;
\t position: relative;
\t border-radius: 150px;
\t -webkit-border-radius: 150px;
\t -moz-border-radius: 150px;
\t display: block;
\t background: #ffe632;
\t background: -webkit-gradient(linear, left top, left bottom, from(#fffe8d), to(#f6d23e));
\t background: -moz-linear-gradient(top, #fffe8d, #f6d23e); \t
\t box-shadow: inset 0px -14px 14px rgba(0, 0, 0, .3), 0px 2px 20px rgba(0, 0, 0, .6);
\t -webkit-box-shadow: inset 0px -14px 14px rgba(0, 0, 0, .3), 0px 2px 20px rgba(0, 0, 0, .6);
\t -moz-box-shadow: inset 0px -14px 14px rgba(0, 0, 0, .3), 0px 2px 20px rgba(0, 0, 0, .6);
\t }
\t
p.eyes {
\t width: 50px;
\t height: 80px;
\t background: #222;
\t border-radius: 100px/160px;
\t -webkit-border-radius: 100px 160px;
\t -moz-border-radius: 100px/160px;
\t position: absolute;
\t top: 40px;
\t box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t -webkit-box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t -moz-box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t } \t
\t
\t p.eyes.lefteye {
\t \t left: 75px;
\t \t }
\t \t
\t p.eyes.righteye {
\t \t right: 75px;
\t \t }
\t \t
div.smile {
\t width: 200px;
\t height: 70px;
\t border: 10px solid #222;
\t border-top: 0;
\t background: rgba(0,0,0,0);
\t -moz-border-radius: 0 0 120px 120px/0 0 90px 90px;
\t -webkit-border-radius: 0 0 120px 120px 0 0 90px 90px;
\t border-radius: 0 0 120px 120px/0 0 90px 90px;
\t position: absolute;
\t bottom: 50px;
\t left: 38px;
\t box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t -webkit-box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t -moz-box-shadow: 0 2px 0 rgba(255,255,255, 0.8);
\t }
\t
div.corner {
\t width: 10px;
\t height: 30px;
\t background: #222;
\t border-radius: 100px/160px;
\t -webkit-border-radius: 100px 160px;
\t -moz-border-radius: 100px/160px;
\t position: absolute;
\t top: -12px;
\t -webkit-transform: rotate(65deg);
\t -moz-transform: rotate(65deg);
\t left: -12px;
\t }
\t
\t div.corner.right {
\t \t left: 202px;
\t \t -webkit-transform: rotate(-65deg);
\t \t -moz-transform: rotate(-65deg); \t \t
\t \t }
<div class="smileyface">
<p class="eyes lefteye"></p>
<p class="eyes righteye"></p>
<div class="smile">
<div class="corner"></div>
<div class="corner right"></div>
</div>
</div>
這是用於製造smilee 現在我想提出一個滑塊值從0到12,它從微笑轉換成傷心
請添加您爲側欄試用的代碼示例 –
爲什麼在與Java沒有關係時標記這個問題'java'? –