<style>body{color:#000;font-family:Tahoma;font-size:14px}
textarea{background:url("http://up.makuonline.ir/textra.png") repeat scroll 0 0 rgba(0,0,0,0);border:1px dashed #000;border-radius:10px;color:#000;direction:ltr;height:150px;margin-top:15px;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:7px;resize:none;width:500px}
input{background-color:#fff;border:2px solid#000;border-radius:4px;color:#000;direction:ltr;font-family:Tahoma;font-size:11px;font-style:normal;font-weight:700;margin-bottom:5px;margin-top:5px;max-width:100%;padding:6px;text-shadow:none}
select{font-size:16px;max-width:100%}
button{background-color:#3abec0;border:1px solid#3abec0;border-radius:3px;color:#000;cursor:pointer;font-family:tahoma;margin-right:5px;margin-top:10px;padding:5px}
button:hover{background-color:#f81a3d;border:1px solid#3abec0;border-radius:3px;color:#eee;margin-right:5px;margin-top:10px;padding:5px}
textarea:hover{border:1px dashed #3abec0;border-radius:10px;box-shadow:0 0 10px 1px#3abec0;transition:all 0.1s ease 0s}
textarea:focus{border:1px dashed #3abec0;border-radius:10px;box-shadow:0 0 10px 1px#3abec0;transition:all 0.1s ease 0s}
</style>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Language" content="fa">
</head>
<script>
css_cod_maker={
CSS:0,
listcode:'',
add:function(){
this.CSS++;
CSS=this.CSS;
makuonline=document.createElement('makuonline');
makuonline.innerHTML='<hr>انتخاب نوع id یا class : <select id="classid'+CSS+'"><option value=""></option><option value=".">class</option><option value="#">id</option></select><br>@class or id name:<input style="direction:rtl;" type="text" id="calass_id'+CSS+'" placeholder="class or id name"><br>background-color:<input style="direction:ltr;" id="color'+CSS+'" placeholder="background-color">';
document.getElementById('add_new_cod').appendChild(makuonline);
},
make:function(){
this.listcode='';
for(i=0;i<=this.CSS;i++){
if(document.getElementById('calass_id'+i).value==''){
alert('باکس id یا class را پر نکرده اید');
return;
}
else{
code='';
code+=document.getElementById('classid'+i).value;
code+=document.getElementById('calass_id'+i).value;
code+='{\n';
if(document.getElementById('color'+i).value!=''){
code+='background-color:'+document.getElementById('color'+i).value;
}
code+='\n}\n\n';
this.listcode+=code;
}
}
document.getElementById('end_cod').value='//*css cod maker by makuonline *//\n'+this.listcode+'//*css cod maker by makuonline *//';
}
}
</script>
<center>
<table id="add_new_cod">
انتخاب نوع id یا class : <select id="classid0">
<option value=""></option>
<option value=".">class</option>
<option value="#">id</option>
</select><br>
class or id name: <input id="calass_id0" type="text" style="direction:rtl;" placeholder="class or id name"><br>
background-color: <input id="color0" style="direction:ltr;" placeholder="background-color"><br>
</table>
<br>
<button onclick="css_cod_maker.add();">add new class</button>
<button onclick="css_cod_maker.make();">create cod css</button>
<br>
<textarea id="end_cod"></textarea>
</center>