Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
VAOZ

Новый простой вид опроса в стиле Flat для uCoz

Recommended Posts

-1029767406.png.f0ddea335c8f7448048fe190eacbc6b6.png

Установка 

1. В стандартный шаблон вид опросов, добавить этот скрипт (не удаляя ничего что там уже есть): 

<script type="text/javascript"> 
var a = ['1','2','3','4','5','6','1','2','3','4','5','6']; 
for(var i = 0; i < a.length; i++){$('div.answer div').eq(i).addClass('progress');$('div.answer div div').eq(i).addClass('progress'+[i]).css({marginBottom: '-3px', backgroundRepeat: 'repeat-x'});} 
$('div.answer span').each(function(){$(this).html($(this).html()+' - <span class="procent">'+$(this).attr('title').split(':')[1]+'</span>')}); 
</script>

2. Закинуть в стили: 

.answer {position:relative;margin:0 0 10px 0;height:25px;padding:0!important;} 
.answer span{z-index:2;position:relative;left:-5px;color:#666;top:5px;text-shadow:0 0 1px #fff;} 
.answer div{position:absolute;top:0px;width:100%;padding:0!important;} 

.progress {  
height:25px; 
background:#eee; 
border-radius:4px; 
-webkit-border-radius:4px; 
-moz-border-radius:4px; 
box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 
-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); 
-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);} 

.progress div {height:25px!important;} 
.procent {top:0!important;left:5px!important;} 
.progress0 {background:#fb3c2d!important;} 
.progress1 {background:rgb(32,195,209)!important;} 
.progress2 {background:rgb(133,202,45)!important;} 
.progress3 {background:rgb(231,197,19)!important;} 
.progress4 {background:rgb(22,184,206)!important;} 
.progress5 {background:rgb(32,195,209)!important;} 
.progress6 {background:rgb(32,195,209)!important;}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×