PDA

View Full Version : به نظرتون بهتر از اینم میشه



jamejam123
دوشنبه 25 فروردین 1393, 00:06 صبح
سلام به این کد من یه نگا بندازید

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
#one{
background:#FC0;
width:600px;
margin:auto;
padding:4px;
display:none;
}

</style>
<title>css</title>
</head>

<body>


<div id="one">
Over its 60 year history, WorldSkills International (formerly known as the "Skill Olympics") has come to symbolise the pinnacle of excellence in vocational training. Every two years hundreds of young skilled people, accompanied by their teachers and trainers, gather together from around the world to compete before the public in the skills of their various trades and test themselves against demanding international standards. They represent the best of their peers drawn from regional and national skill competitions held currently in 52 countries/regions.

The experience and results of all the competitions provide valuable feedback both to the individuals and the systems and enterprises in which they are being trained. For some it is recognition for outstanding achievement, while for others it provides the motivation and knowledge to aspire to higher standards. For the onlookers it is a revealing experience to see highly competent young tradespeople in action. The competitions are particularly effective in the context of providing positive career role models for school aged youngsters.
</div>
<button onClick="ojj()">clcik</button>
<script type="text/javascript">
function ojj(){

document.getElementById('one').style.display='bloc k';
document.getElementById('one').style.height='0px';
document.getElementById('one').style.overflow='hid den';
var uyui=0;
var bhb=setInterval(function(){
if(uyui==400){
clearInterval(bhb);
}
uyui=uyui+10;
document.getElementById('one').style.height=uyui+' px';
document.getElementById('one').style.paddingBottom ='40px';
},100);

}

</script>
</body>
</html>



من تو اینجا یه تابع شبیه تابع show تو jquery نوشتم.
به نظرتون بهتر از اینم میتونه بشه.
آیا روش های دیگری هم برای این کار وجود دارد.
ممنون