123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="wrapper">
<ul class="main">
  
  <!-- ROW 1 -->
  
  <li data-pos="1" data-nb="1.0079" class="type-1 cat-2">H<span>هيدروجين</span></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li data-pos="2" data-nb="4.0026" class="type-2 cat-2">He<span>هيليوم</span></li>
  
  <!-- ROW 2 -->
  
  <li data-pos="3" data-nb="6.941" class="type-3 cat-0">Li<span>ليثيوم</span></li>
  <li data-pos="4" data-nb="9.0122" class="type-4 cat-0">Be<span>بيريليوم</span></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li data-pos="5" data-nb="10.811" class="type-5 cat-0">B<span>بورون</span></li>
  <li data-pos="6" data-nb="12.011" class="type-5 cat-0">C<span>كربون</span></li>
  <li data-pos="7" data-nb="14.007" class="type-5 cat-2">N<span>تيتروجين</span></li>
  
  <li data-pos="8" data-nb="15.999" class="type-5 cat-2">O<span>أوكسجين</span></li>
  <li data-pos="9" data-nb="18.998" class="type-5 cat-2">F<span>فلور</span></li>
  <li data-pos="10" data-nb="20.180" class="type-2 cat-2">Ne<span>نيون</span></li>
  
  <!-- ROW 3 -->
  
  <li data-pos="11" data-nb="22.990" class="type-3 cat-0">Na<span>صوديوم</span></li>
  <li data-pos="12" data-nb="24.305" class="type-4 cat-0">Mg<span>ماغنيسيوم</span></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  <li class="empty"></li>
  
  <li class="empty"></li>
  <li class="empty"></li>
  <li data-pos="13" data-nb="26.982" class="type-7 cat-0">Al<span>المنيوم</span></li>
  <li data-pos="14" data-nb="28.086" class="type-5 cat-0">Si<span>سيليكون</span></li>
  <li data-pos="15" data-nb="30.974" class="type-5 cat-0">P<span>فوسفور</span></li>
  
  <li data-pos="16" data-nb="32.065" class="type-5 cat-0">S<span>كبريت</span></li>
  <li data-pos="17" data-nb="35.453" class="type-5 cat-2">Cl<span>كلور</span></li>
  <li data-pos="18" data-nb="39.948" class="type-2 cat-2">Ar<span>ارجون</span></li>
  
  <!-- ROW 4 -->
  
  <li data-pos="19" data-nb="39.098" class="type-3 cat-0">K<span>بوتاسيوم</span></li>
  <li data-pos="20" data-nb="40.078" class="type-4 cat-0">Ca<span>كالسيوم</span></li>
  <li data-pos="21" data-nb="44.956" class="type-6 cat-0">Sc<span>سكانديوم</span></li>
  <li data-pos="22" data-nb="47.867" class="type-6 cat-0">Ti<span>تيتانيوم</span></li>
  <li data-pos="23" data-nb="50.942" class="type-6 cat-0">V<span>فانديوم</span></li>
  
  <li data-pos="24" data-nb="51.996" class="type-6 cat-0">Cr<span>كروم</span></li>
  <li data-pos="25" data-nb="54.938" class="type-6 cat-0">Mn<span>منجنيز</span></li>
  <li data-pos="26" data-nb="55.845" class="type-6 cat-0">Fe<span>حديد</span></li>
  <li data-pos="27" data-nb="58.933" class="type-6 cat-0">Co<span>كوبالت</span></li>
  <li data-pos="28" data-nb="58.693" class="type-6 cat-0">Ni<span>نيكل</span></li>
  
  <li data-pos="29" data-nb="63.546" class="type-6 cat-0">Cu<span>نحاس</span></li>
  <li data-pos="30" data-nb="65.39" class="type-7 cat-0">Zn<span>زنك</span></li>
  <li data-pos="31" data-nb="69.723" class="type-7 cat-0">Ga<span>جاليوم</span></li>
  <li data-pos="32" data-nb="72.64" class="type-7 cat-0">Ge<span>جيرمانيوم</span></li>
  <li data-pos="33" data-nb="74.922" class="type-5 cat-0">As<span>زرنيخ</span></li>
  
  <li data-pos="34" data-nb="78.96" class="type-5 cat-0">Se<span>سيلينيوم</span></li>
  <li data-pos="35" data-nb="79.904" class="type-5 cat-1">Br<span>بروم</span></li>
  <li data-pos="36" data-nb="83.80" class="type-2 cat-2">Kr<span>كريتون</span></li>
  
  <!-- ROW 5 -->
  
  <li data-pos="37" data-nb="85.468" class="type-3 cat-0">Rb<span>روبيديوم</span></li>
  <li data-pos="38" data-nb="87.62" class="type-4 cat-0">Sr<span>سترونيوم</span></li>
  <li data-pos="39" data-nb="88.906" class="type-6 cat-0">Y<span>ايتيريوم</span></li>
  <li data-pos="40" data-nb="91.224" class="type-6 cat-0">Zr<span>زركونيوم</span></li>
  <li data-pos="41" data-nb="92.906" class="type-6 cat-0">Nb<span>نيوبيوم</span></li>
  
 <li data-pos="42" data-nb="95.94" class="type-6 cat-0">Mo<span>مولبيديوم</span></li>
  <li data-pos="43" data-nb="(96)" class="type-6 cat-0">Tc<span>تكنيتيوم</span></li>
  <li data-pos="44" data-nb="101.07" class="type-6 cat-0">Ru<span>روثينيوم</span></li>
  <li data-pos="45" data-nb="102.91" class="type-6 cat-0">Rh<span>روديوم</span></li>
  <li data-pos="46" data-nb="106.42" class="type-6 cat-0">Pd<span>بلاديوم</span></li>
  
  <li data-pos="47" data-nb="107.87" class="type-6 cat-0">Ag<span>فضة</span></li>
  <li data-pos="48" data-nb="112.41" class="type-7 cat-0">Cd<span>كامديوم</span></li>
  <li data-pos="49" data-nb="114.82" class="type-7 cat-0">In<span>إنديوم</span></li>
  <li data-pos="50" data-nb="118.71" class="type-7 cat-0">Sn<span>قصدير</span></li>
  <li data-pos="51" data-nb="121.76" class="type-7 cat-0">Sb<span>انتيمون</span></li>
  
  <li data-pos="52" data-nb="127.60" class="type-5 cat-0">Te<span>تيلوريوم</span></li>
  <li data-pos="53" data-nb="126.90" class="type-5 cat-0">I<span>يود</span></li>
  <li data-pos="54" data-nb="131.29" class="type-2 cat-2">Xe<span>زيتون</span></li>
  
  <!-- ROW 6 -->
  
  <li data-pos="55" data-nb="132.91" class="type-3 cat-0">Cs<span>سيزيوم</span></li>
  <li data-pos="56" data-nb="137.33" class="type-4 cat-0">Ba<span>باريوم</span></li>
  <li data-pos="57-71" class="type-8">La-Lu<span>لانثنايد</span></li>
  <li data-pos="72" data-nb="178.49" class="type-6 cat-0">Hf<span>هافنيوم</span></li>
  <li data-pos="73" data-nb="180.95" class="type-6 cat-0">Ta<span>تانتانيوم</span></li>
  
  <li data-pos="74" data-nb="183.64" class="type-6 cat-0">W<span>تنجستن</span></li>
  <li data-pos="75" data-nb="186.21" class="type-6 cat-0">Re<span>رينيوم</span></li>
  <li data-pos="76" data-nb="190.23" class="type-6 cat-0">Os<span>أوزميوم</span></li>
  <li data-pos="77" data-nb="192.22" class="type-6 cat-0">Ir<span>اريديوم</span></li>
  <li data-pos="78" data-nb="195.08" class="type-6 cat-0">Pt<span>بلاتين</span></li>
  
 <li data-pos="79" data-nb="196.97" class="type-6 cat-0">Au<span>ذهب</span></li>
  <li data-pos="80" data-nb="200.59" class="type-7 cat-1">Hg<span>زئبق</span></li>
  <li data-pos="81" data-nb="204.38" class="type-7 cat-0">Tl<span>ثاليوم</span></li>
  <li data-pos="82" data-nb="207.2" class="type-7 cat-0">Pb<span>رصاص</span></li>
  <li data-pos="83" data-nb="208.96" class="type-7 cat-0">Bi<span>بزموث</span></li>
  
  <li data-pos="84" data-nb="(209)" class="type-7 cat-0">Po<span>بولونيوم</span></li>
  <li data-pos="85" data-nb="(210)" class="type-5 cat-0">At<span>استاتين</span></li>
  <li data-pos="86" data-nb="(222)" class="type-2 cat-2">Rn<span>رادون</span></li>
  
  <!-- ROW 7 -->
  
  <li data-pos="87" data-nb="(223)" class="type-3 cat-0">Fr<span>فرانسيوم</span></li>
  <li data-pos="88" data-nb="(226)" class="type-4 cat-0">Ra<span>راديوم</span></li>
  <li data-pos="89-103" class="type-9">Ac-Lr<span>اكتنيد</span></li>
  <li data-pos="104" data-nb="(261)" class="type-6 cat-3">Rf<span>رذرفورديوم</span></li>
  <li data-pos="105" data-nb="(262)" class="type-6 cat-3">Db<span>دبنيوم</span></li>
  
  <li data-pos="106" data-nb="(266)" class="type-6 cat-3">Sg<span>سيبورجيوم</span></li>
  <li data-pos="107" data-nb="(264)" class="type-6 cat-3">Bh<span>بوريوم</span></li>
  <li data-pos="108" data-nb="(277)" class="type-6 cat-3">Hs<span>هاسيوم</span></li>
  <li data-pos="109" data-nb="(268)" class="type-6 cat-3">Mt<span>ماتيريوم</span></li>
  <li data-pos="110" data-nb="(281)" class="type-6 cat-3">Ds<span>دام ستيديوم</span></li>
  
  <li data-pos="111" data-nb="(272)" class="type-6 cat-3">Rg<span>روتيجينيوم</span></li>
  <li data-pos="112" data-nb="(285)" class="type-7 cat-3">Uub<span>انون بيوم</span></li>
  <li data-pos="113" data-nb="(285)" class="type-7 cat-3">Uut<span>انون تريوم</span></li>
  <li data-pos="114" data-nb="(289)" class="type-7 cat-3">Uuq<span>انون كواديوم</span></li>
  <li data-pos="115" data-nb="(289)" class="type-7 cat-3">Uup<span>انون بيتينيوم</span></li>
  
  <li data-pos="115" data-nb="(289)" class="type-7 cat-3">Uuh<span>انون هيسيتيوم</span></li>
  <li data-pos="115" data-nb="(289)" class="type-0 cat-3">Uus<span>انون سبيتيوم</span></li>
  <li data-pos="115" data-nb="(289)" class="type-2 cat-3">Uuo<span>انون اوكتيوم</span></li>
</ul>
  
<div class="legend">
  <ul class="list-1">
    <li class="cat-0"><span>C</span>صلب</li>
    <li class="cat-1"><span>Hg</span>سائل</li>
    <li class="cat-2"><span>H</span>غاز</li>
    <li class="cat-3"><span>Rf</span>غير معروف</li>
  </ul>
  
  <ul class="list-2">
    <li class="type-3">فلزات قلوية</li>
    
    <li class="type-8">فلزات قلويات ترابيه</li>
    <li class="type-9">اللانثنايد</li>
    <li class="type-7">فلزات ضعيفة</li>
    <li class="type-2">غازات نبيله</li>
    <li class="type-6">فلزات انتقالية</li>
    <li class="type-5">اللا فلزا</li>
    <li class="type-4">فلزات قلويات ترابية</li>
  </ul>
</div>

</div>


            
          
!
            
              @import "compass/css3";

* { box-sizing: border-box; }

body {
  background:linear-gradient(#dbeaf8, #dbeaf8);
  color:#222;
  font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
}

.wrapper {
 	width:1050px;
  margin:30px auto;
  position:relative;
} 

.main:after {
 	clear:both;
  content:"";
  display:table;
}
 
.main li {
 	width:56px;
  height:60px;
  border:1px solid rgba(0,0,0,0.3);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.4);
  position:relative;
  font-size:18px;
  float:left;
  padding:0 2px;
  margin:1px;
  cursor:pointer;
  padding-top:20px;
  overflow:hidden;
  transition:all .2s ease-in;
  text-shadow:0 1px 0 rgba(255,255,255,0.2);
}

.main li span {
  display:block;
  line-height:1;
  font-size:9px;
  color:black; 
  padding-top:9px;
}

.main .empty {
 	border:none; 
  box-shadow:none;
  cursor:default;
}

.deactivate {
 	opacity:0.5;
  -webkit-filter:grayscale(70%);
  filter:grayscale(70%);
}

.main li:before,
.main li:after {
 	content:attr(data-pos);
  position:absolute;
  top:3px;
  left:3px;
  color:black;
  font-size:8px;
  line-height:1;
}

.main li:after {
  content:attr(data-nb);
  left:auto;
  right:3px;
}

.main li:hover {
 	transform:scale(2);
  z-index:100;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
} 

.main .empty:hover {
 	box-shadow:none;
  transform:none;
}

.type-0 { background:#fff; }
.type-1 { background:#dddddd; }
.type-2 { background:#a8bffa; }
.type-3 { background:#F8B707; }
.type-4 { background:#f3f300; }
.type-5 { background:#3bd93b; }
.type-6 { background:#dd9999; }
.type-7 { background:#4CAFFA; }
.type-8 { background:#ffaa88; }
.type-9 { background:#ddaacc; }

.cat-0 { color:#222; }
.cat-1 { color:#0000dc; }
.cat-2 { color:#b10601; }
.cat-3 { color:#555; }

.legend {
 	position:absolute;
  top:0;
  left:20%;
  padding:10px;
  font-size:11px;
  background:#f1edec;
  border:1px solid rgba(0,0,0,0.2);
  border-radius:15px;
  box-shadow:
    inset 0 1px 1px white,
    inset 0 -5px 3px #dddcdb,
    0 0 10px rgba(0,0,0,0.2);
}

.legend:after {
 	content:"";
  display:table;
  clear:table;
}

.legend ul { float:left; }

.legend .list-2 {
 	margin-left:40px; 
  width:200px;
}

.legend .list-1 li { margin:7px 0; }
.legend .list-1 li:first-of-type { margin-top: 2px; }

.legend .list-1 span {
 	border:1px solid black; 
  display:inline-block;
  padding:3px;
  width:20px;
  text-align:center;
  height:20px; 
  margin-right:5px;
}

.legend .list-2 li {
  margin:2px;
  padding:3px;
 	float:left; 
  border:1px solid rgba(0,0,0,0.2);
  width:48%;
  cursor:pointer;
}
            
          
!
            
               $(function(){
    $('li[class^="type-"]').mouseover(function(){
      var currentClass = $(this).attr('class').split(' ')[0];
      if(currentClass != 'empty'){
      	$('.main > li').addClass('deactivate');
      	$('.' + currentClass).removeClass('deactivate');
      }
    });
   
   $('li[class^="cat-"]').mouseover(function(){
      var currentClass = $(this).attr('class').split(' ')[0];
      	$('.main > li').addClass('deactivate');
      	$('.' + currentClass).removeClass('deactivate');
    }); 
    
    $('.main > li').mouseout(function(){
      var currentClass = $(this).attr('class').split(' ')[0];
       $('.main > li').removeClass('deactivate');
    }); 
 
}); 
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console