[HTML-CSS-JS]Make Picture

K

kelvinac

[TẶNG BẠN] TRỌN BỘ Bí kíp học tốt 08 môn
Chắc suất Đại học top - Giữ chỗ ngay!!

ĐĂNG BÀI NGAY để cùng trao đổi với các thành viên siêu nhiệt tình & dễ thương trên diễn đàn.

Haha, Kelvin định sau khi diễn đàn update thì sẽ cống hiến trở lại để lên mod nhưng với cái tiến độ này thì =_= nên kelvin làm ngay bây giờ luôn :D
Đầu tiên là khởi động với màn bắn súng của thế kỉ XXII

Demo:

http://kelvinkingleon.cool.st/h1-page
 
K

kelvinac

HTML:
 <!-- START Intro - svg title, background intro -->
  <div id="intro">
    <div id="title-intro">
      <!-- START SVG - svg title -->
      <svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 960 560" enable-background="new 0 0 960 560" xml:space="preserve" id ="title-draw">
        <g id="STAR">
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="430.666,165.334 375.333,165.334 
              375.333,264   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="355.333,428.355 364.666,406.355 
              429.999,406.355 439.333,428.355   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="334.666,428.355 378.667,311.021 
              416.666,311.021 461.999,428.355   "/>
            <line class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" x1="351.05" y1="384.666" x2="445.12" y2="384.666"/>
            <polygon class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="378.667,365.021 391.999,329.689 
              403.333,329.689 415.333,365.021   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="312,428.355 364,289.021 430.666,289.021 
              482.666,428.355   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="456.999,263.689 466.333,241.689 
              531.666,241.689 540.998,263.689   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="436.333,263.689 480.334,146.355 
              518.332,146.355 563.664,263.689   "/>
            <line class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" x1="452.716" y1="220" x2="546.785" y2="220"/>
            <polygon class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="480.334,200.355 493.666,165.023 
              505,165.023 517,200.355   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="413.666,263.689 465.666,124.355 
              532.332,124.355 584.332,263.689   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="117.999,289.021 167.999,425.334 
              195.333,425.334 225.999,347.355 255.999,425.334 281.999,425.334 334.666,289.021   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="139.333,289.021 181.333,399.334 
              215.999,311.021 233.999,311.021 268.666,399.334 312,289.021   "/>
            <polyline class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" points="161.333,289.021 181.999,344.178 
              201.999,289.021 247.999,289.021 269.333,344.178 289.999,289.021   "/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M113.999,220H240.33 c3.118,0,3.908-1.845,1.755-4.101l-20.171-21.13c-2.153-2.256-5.368-6.198-7.145-8.76c0,0-30.519-44.008,20.944-58.019 L430.666,128"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M113.999,241.689H246.33 c3.118,0,8.174-0.486,11.235-1.08c0,0,23.769-4.609,11.102-25.942l-34.221-38.264c-2.079-2.324-4.438-6.69-5.244-9.702 c0,0-4.869-18.201,18.131-20.346h183.333"/>
            <line class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" x1="353.333" y1="146.284" x2="353.333" y2="263.689"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M113.999,260.667h141.664 c3.118,0,8.06-0.891,10.982-1.979c0,0,53.272-19.84,10.021-64.702l-21.578-24.406c-2.065-2.336-1.204-4.247,1.914-4.247h71.995 c3.118,0,5.669,2.551,5.669,5.669v92.686"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M593.999,263.689V130.025 c0-3.118,2.551-5.669,5.669-5.669h76.662c3.118,0,8.127,0.684,11.131,1.521c0,0,81.872,22.789,23.205,94.124h122.666"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M614.666,263.689V149.19 c0-1.559,1.275-2.836,2.835-2.837l60.33-0.065c1.56-0.001,4.09,0.226,5.624,0.506c0,0,28.544,5.207,26.544,29.874 c0,0-0.001,28.667-28.667,34l-11.169,0.532c-1.557,0.074-1.935,1.042-0.839,2.151l26.016,26.323 c1.096,1.109,3.268,2.016,4.827,2.016h133.165"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M634.666,168.168c0-1.559,1.275-2.834,2.835-2.834 h38.33c1.56,0,3.882,0.729,5.161,1.62c0,0,18.008,12.546-2.326,23.713h-41.165c-1.56,0-2.835-1.275-2.835-2.834V168.168z"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M634.666,263.689v-46.686 c0-3.118,1.65-4.919,3.666-4.003c2.018,0.917,5.438,3.503,7.603,5.748l28.796,29.86c2.165,2.245,6.389,4.782,9.387,5.639 c0,0,18.383,5.253,29.549,5.087l119.666-0.084"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M494,428.668V295.003 c0-3.118,2.551-5.669,5.669-5.669h76.662c3.118,0,8.127,0.685,11.131,1.521c0,0,81.872,22.789,23.205,94.124h81.414 c3.118,0,4.023-1.949,2.012-4.332l-26.436-31.314c-2.012-2.383-4.562-6.718-5.667-9.633c0,0-15.24-40.199,32.51-48.449 l138.832-0.5"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M515.333,427.667V313.168 c0-1.56,1.275-2.836,2.835-2.838l60.33-0.065c1.56-0.002,4.09,0.226,5.624,0.506c0,0,28.544,5.207,26.544,29.874 c0,0-0.001,28.666-28.667,34l-11.169,0.532c-1.557,0.074-1.935,1.042-0.839,2.151l26.016,26.322 c1.096,1.109,3.268,2.017,4.827,2.017h104.581c1.56,0,4.108-0.065,5.666-0.146c0,0,22.417-1.148,12.918-29.21l-37.702-36.101 c-1.126-1.079-2.697-3.058-3.493-4.398c0,0-10.554-17.789,12.946-25.551h137.582"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M534.332,333.347c0-1.56,1.275-2.835,2.835-2.835 h38.33c1.56,0,3.882,0.729,5.161,1.62c0,0,18.008,12.546-2.326,23.713h-41.165c-1.56,0-2.835-1.275-2.835-2.835V333.347z"/>
            <path class="dash" stroke-linecap="square" fill="none" stroke="#FAFAFA" stroke-width="6" stroke-miterlimit="10" d="M535.333,428.667V381.98 c0-3.118,1.649-4.919,3.667-4.002c2.016,0.916,5.437,3.502,7.602,5.747l28.796,29.86c2.165,2.245,6.389,4.782,9.387,5.639 c0,0,18.383,5.253,29.549,5.087l93.664-0.065c3.118-0.002,8.092-0.802,11.054-1.777c0,0,45.449-14.969,19.199-59.219 l-27.804-28.68c-2.171-2.238-1.396-4.07,1.723-4.07h121.163"/>
        </g>
      </svg>
      <!-- END SVG - svg title -->
    </div>
  </div>
  <!-- END Intro - svg title, background intro -->
vì code quá dài nên sẽ còn nhiều phần -_-
 
K

kelvinac

HTML:
  <div id="draw-css">
  <!-- START Background - sky, sun, clouds, ground -->
    <div id="background">
  
      <div class="sky"></div>
      <div class="sun"></div>
      <div class="cloud1"></div>
      <div class="cloud2"></div>
      <div class="cloud3"></div>
      <div class="cloud4"></div>
      <div class="ground"></div>
  
    </div>
<!-- END Background - sky, sun, clouds, ground -->

<!-- START Front part - all of the square, and circle of front part -->
    <div id="spaceship">

      <div id="front">
        
        <div class="shadow"></div>
        <div id="dust1">
        <div class="dust1-part1"></div>
        <div class="dust1-part2"></div>
      </div>
      
      <div id="dust2">
        <div class="dust2-part1"></div>
        <div class="dust2-part2"></div>
      </div>
      
      <div id="dust3">
        <div class="dust3-part1"></div>
      </div>
      
      <div id="dust4">
        <div class="dust4-part1"></div>
        <div class="dust4-part2"></div>
        <div class="dust4-part3"></div>
      </div>
        <div class="front-part"></div>
        <div class="main-front2"></div>
        <div class="protectPart-front"></div>
        <div class="protectPart-front2"></div>
        <div class="protectPart-front2"></div>
        <div class="front"></div>
        <div class="front1"></div>
        <div class="main-front"></div>
        <div class="reactor-support1-3"></div>
        <div class="reactor-support1-4"></div>
        <div class="reactor-support1-2"></div>
        <div class="reactor-support1"></div>
        <div class="reactor-support2"></div>
        <div class="footer-of-spaceship"></div>
        <div class="hide-reactor"></div>
        <div class="main-front-2-b"></div>
        <div class="exhaust-front1"></div>
        <div class="exhaust-front2"></div>
        <div class="exhaust-front3"></div>
        <div class="square-front"></div>
        <div class="square-front1"></div>
        <div class="square-front2"></div>
        <div class="square-front3"></div>
        <div class="square-front4"></div>
        <div class="square-front5"></div>
        <div class="square-front6"></div>
        <div class="square-front7"></div>
        <div class="square-front8"></div>
        <div class="aerator-front-b"></div>
        <div class="aerator-front1"></div>
        <div class="aerator-front2"></div>
        <div class="aerator-front3"></div>
        <div class="aerator-front4"></div>
        <div class="aerator-front5"></div>
        <div class="aerator-front6"></div>
        <div class="glass-front"></div>
        <div class="glass-protect-front"></div>
        <div class="m-b-left7"></div>
        <div class="m-b-left8"></div>
        <div class="m-b-left9"></div>
        <div class="chassis"></div>
        <div class="m-b-left5"></div>
        <div class="m-b-left6"></div>
        <div class="shoes-support"></div>
        <div class="shoes-support2"></div>
        <div class="m-b-left1"></div>
        <div class="m-b-left4"></div>
        <div class="cylinder1"></div>
        <div class="m-b-left2"></div>
        <div class="cylinder"></div>
        <div class="m-b-left3"></div>
        <div class="missile"></div>
        <div class="weapon"></div>
        <div class="weapon2"></div>
        <div class="weapon3"></div>
        <div class="weapon4"></div>
        <div class="weapon5"></div>
        <div class="weapon6"></div>

      </div>
    <!-- END Front part - all of the square, and circle of front part

    <!-- START Middle part - all of the square, and circle of middle part -->
      <div class="middle">

        <div class="middle-bottom"></div>
        <div class="m-b-right"></div>
        <div class="m-b-middle"></div>

      </div>
    <!-- END Middle part - all of the square, and circle of middle part -->

    <!-- START Character part - all of the square, and circle of character part -->
      <div class="perso">

        <div class="knee-protection"></div>
        <div class="shoes"></div>
        <div class="leg"></div>
        <div class="shoes2"></div>
        <div class="shoes3"></div>
        <div class="pants2"></div>
        <div class="pants"></div>
        <div class="pants3"></div>
        <div class="armright"></div>
        <div class="face"></div>
        <div class="face2"></div>
        <div class="mask"></div>
        <div class="beanny"></div>
        <div class="beanny2"></div>
        <div class="shirt"></div>
        <div class="shirt2"></div>
        <div class="shirt4"></div>
        <div class="shirt5"></div>
        <div class="shirt6"></div>
        <div class="shirt7"></div>
        <div class="shirt3"></div>
        <div class="armleft2"></div>
        <div class="armleft"></div>
        <div class="shoulder"></div>
        <div class="backpant"></div>
        <div class="belt"></div>
        <div class="bag"></div>
        <div class="bag2"></div>

      </div>
    <!-- END Character part - all of the square, and circle of character part -->

    <!-- START Back part - all of the square, and circle of back part -->  
      <div class="back">

        <div class="flam"></div>
        <div class="vis1"></div>
        <div class="vis2"></div>
        <div class="reactor1"></div>
        <div class="reactor1-2"></div>
        <div class="reactor2"></div>
        <div class="reactor2-2"></div>
        <div id="reactor-projector-top">

        <div class="reactor-projector-t"></div>
            <div class="reactor-projector1-t"></div>
            <div class="reactor-projector2-t"></div>
            <div class="reactor-projector3-t"></div>
        </div>

        <div id="reactor-projector-bottom">
          <div class="reactor-projector-b"></div>
          <div class="reactor-projector1-b"></div>
          <div class="reactor-projector2-b"></div>
          <div class="reactor-projector3-b"></div>
        </div>

      </div>

    </div>
<!-- END Back part - all of the square, and circle of back part -->

<!-- START Overlay part - overlay to add old texture at the creation -->
    <div id="overlay"></div>
<!-- END Overlay part - overlay to add old texture at the creation -->
  
  </div>
<!-- START Credits part - nav and credits -->
  <div id="nav">
    <a class="op-menu op" href="#">Open Credits</a>
    <a class="op-menu cl hidden" href="#">Close Credits</a>
  </div>

  <div class="menu vhidden">
    <div class="credits">
      <p>
        The first part, Star Wars Title was inspired by this <a class="dribbble" href="https://dribbble.com/shots/1303800-Star-Wars" target="_blank">Dribbble</a>, made with SVG and CSS animations
      </p>
      <p>
        The second part, the spaceship, was inspired by this <a class="dribbble" href="https://dribbble.com/shots/1827287-The-Force-Awakens" target="_blank">Dribbble</a>, made in full css, no js, no svg, just one picture, the overlay for add some texture.
      </p>
      <p> Made by <a href="http://www.guillaumelebelt.fr" class="gl" target="_blank">Guillaume LEBELT</a> for an <a href="http://hetic.net" class="hetic" target="_blank">HETIC</a> Project, date : 17/10/2015.</p>
    </div>
  </div>
<!-- END Credits part - nav and credits -->[HTML]
hết html :) post sau sẽ là css
 
K

kelvinac

<div id="draw-css">
<!-- START Background - sky, sun, clouds, ground -->
<div id="background">

<div class="sky"></div>
<div class="sun"></div>
<div class="cloud1"></div>
<div class="cloud2"></div>
<div class="cloud3"></div>
<div class="cloud4"></div>
<div class="ground"></div>

</div>
<!-- END Background - sky, sun, clouds, ground -->

<!-- START Front part - all of the square, and circle of front part -->
<div id="spaceship">

<div id="front">

<div class="shadow"></div>
<div id="dust1">
<div class="dust1-part1"></div>
<div class="dust1-part2"></div>
</div>

<div id="dust2">
<div class="dust2-part1"></div>
<div class="dust2-part2"></div>
</div>

<div id="dust3">
<div class="dust3-part1"></div>
</div>

<div id="dust4">
<div class="dust4-part1"></div>
<div class="dust4-part2"></div>
<div class="dust4-part3"></div>
</div>
<div class="front-part"></div>
<div class="main-front2"></div>
<div class="protectPart-front"></div>
<div class="protectPart-front2"></div>
<div class="protectPart-front2"></div>
<div class="front"></div>
<div class="front1"></div>
<div class="main-front"></div>
<div class="reactor-support1-3"></div>
<div class="reactor-support1-4"></div>
<div class="reactor-support1-2"></div>
<div class="reactor-support1"></div>
<div class="reactor-support2"></div>
<div class="footer-of-spaceship"></div>
<div class="hide-reactor"></div>
<div class="main-front-2-b"></div>
<div class="exhaust-front1"></div>
<div class="exhaust-front2"></div>
<div class="exhaust-front3"></div>
<div class="square-front"></div>
<div class="square-front1"></div>
<div class="square-front2"></div>
<div class="square-front3"></div>
<div class="square-front4"></div>
<div class="square-front5"></div>
<div class="square-front6"></div>
<div class="square-front7"></div>
<div class="square-front8"></div>
<div class="aerator-front-b"></div>
<div class="aerator-front1"></div>
<div class="aerator-front2"></div>
<div class="aerator-front3"></div>
<div class="aerator-front4"></div>
<div class="aerator-front5"></div>
<div class="aerator-front6"></div>
<div class="glass-front"></div>
<div class="glass-protect-front"></div>
<div class="m-b-left7"></div>
<div class="m-b-left8"></div>
<div class="m-b-left9"></div>
<div class="chassis"></div>
<div class="m-b-left5"></div>
<div class="m-b-left6"></div>
<div class="shoes-support"></div>
<div class="shoes-support2"></div>
<div class="m-b-left1"></div>
<div class="m-b-left4"></div>
<div class="cylinder1"></div>
<div class="m-b-left2"></div>
<div class="cylinder"></div>
<div class="m-b-left3"></div>
<div class="missile"></div>
<div class="weapon"></div>
<div class="weapon2"></div>
<div class="weapon3"></div>
<div class="weapon4"></div>
<div class="weapon5"></div>
<div class="weapon6"></div>

</div>
<!-- END Front part - all of the square, and circle of front part

<!-- START Middle part - all of the square, and circle of middle part -->
<div class="middle">

<div class="middle-bottom"></div>
<div class="m-b-right"></div>
<div class="m-b-middle"></div>

</div>
<!-- END Middle part - all of the square, and circle of middle part -->

<!-- START Character part - all of the square, and circle of character part -->
<div class="perso">

<div class="knee-protection"></div>
<div class="shoes"></div>
<div class="leg"></div>
<div class="shoes2"></div>
<div class="shoes3"></div>
<div class="pants2"></div>
<div class="pants"></div>
<div class="pants3"></div>
<div class="armright"></div>
<div class="face"></div>
<div class="face2"></div>
<div class="mask"></div>
<div class="beanny"></div>
<div class="beanny2"></div>
<div class="shirt"></div>
<div class="shirt2"></div>
<div class="shirt4"></div>
<div class="shirt5"></div>
<div class="shirt6"></div>
<div class="shirt7"></div>
<div class="shirt3"></div>
<div class="armleft2"></div>
<div class="armleft"></div>
<div class="shoulder"></div>
<div class="backpant"></div>
<div class="belt"></div>
<div class="bag"></div>
<div class="bag2"></div>

</div>
<!-- END Character part - all of the square, and circle of character part -->

<!-- START Back part - all of the square, and circle of back part -->
<div class="back">

<div class="flam"></div>
<div class="vis1"></div>
<div class="vis2"></div>
<div class="reactor1"></div>
<div class="reactor1-2"></div>
<div class="reactor2"></div>
<div class="reactor2-2"></div>
<div id="reactor-projector-top">

<div class="reactor-projector-t"></div>
<div class="reactor-projector1-t"></div>
<div class="reactor-projector2-t"></div>
<div class="reactor-projector3-t"></div>
</div>

<div id="reactor-projector-bottom">
<div class="reactor-projector-b"></div>
<div class="reactor-projector1-b"></div>
<div class="reactor-projector2-b"></div>
<div class="reactor-projector3-b"></div>
</div>

</div>

</div>
<!-- END Back part - all of the square, and circle of back part -->

<!-- START Overlay part - overlay to add old texture at the creation -->
<div id="overlay"></div>
<!-- END Overlay part - overlay to add old texture at the creation -->

</div>
<!-- START Credits part - nav and credits -->
<div id="nav">
<a class="op-menu op" href="#">Open Credits</a>
<a class="op-menu cl hidden" href="#">Close Credits</a>
</div>

<div class="menu vhidden">
<div class="credits">
<p>
The first part, Star Wars Title was inspired by this <a class="dribbble" href="https://dribbble.com/shots/1303800-Star-Wars" target="_blank">Dribbble</a>, made with SVG and CSS animations
</p>
<p>
The second part, the spaceship, was inspired by this <a class="dribbble" href="https://dribbble.com/shots/1827287-The-Force-Awakens" target="_blank">Dribbble</a>, made in full css, no js, no svg, just one picture, the overlay for add some texture.
</p>
<p> Made by <a href="http://www.guillaumelebelt.fr" class="gl" target="_blank">Guillaume LEBELT</a> for an <a href="http://hetic.net" class="hetic" target="_blank">HETIC</a> Project, date : 17/10/2015.</p>
</div>
</div>
<!-- END Credits part - nav and credits -->


hết html :) post sau sẽ là css
 
K

kelvinac

css part 1

Mã:
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SUMMARY
1_  General
2_  Intro SVG
3_  CSS Draw
4_  Overlay
5_  Ground
6_  Clouds
7_  Reactor
8_  Sun
9_  Dust
10_ Shadow
11_ Flam
12_ Spaceship - Front Part
13_ Spaceship - Middle Part
14_ Spaceship - Back Part
15_ Spaceship - Guy Part
16_ Missiles
17_ Animations
18_ Crédits
19_ Navigation
20_ Sélection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
General
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

@import url(https://fonts.googleapis.com/css?family=Raleway);


body {
  margin: 0;
  padding: 0;
  width:100%;
  height: 100%;
  background-color: #c4e0db;
  overflow: hidden;
  font-family: 'Raleway', sans-serif;
}

a {
  text-decoration: none;
}

p {
  color: black;
}

#background {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Intro SVG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

#intro {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  -webkit-transform: translateX(-50%) translateY(-50%);
      -ms-transform: translateX(-50%) translateY(-50%);
     -moz-transform: translateX(-50%) translateY(-50%);
       -o-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
  height: 700px;
  width: 1000px;
  background-color: #ed715c;
  -webkit-animation: intro 7s linear;
     -moz-animation: intro 7s linear;
      -ms-animation: intro 7s linear;
       -o-animation: intro 7s linear;
          animation: intro 7s linear;
 -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
     -ms-animation-fill-mode: forwards;
      -o-animation-fill-mode: forwards;
         animation-fill-mode: forwards;
}

#title-draw {
  position: relative;
  left: 50%;
  top: 50%;
  -webkit-transform: translateX(-50%) translateY(-50%);
      -ms-transform: translateX(-50%) translateY(-50%);
     -moz-transform: translateX(-50%) translateY(-50%);
       -o-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
  width:60%;
  height: auto;
}

#title-intro {
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
}

.dash {
  opacity: 0;
  filter: alpha(opacity=0);
  stroke-dasharray: 2650;
  stroke-dashoffset: 0;
  -webkit-animation: stroke 5s linear;
  -moz-animation: stroke 5s linear;
  -ms-animation: stroke 5s linear;
  -o-animation: stroke 5s linear;
          animation: stroke 5s linear;
  -webkit-animation-delay: 0.2s;
  -moz-animation-delay: 0.2s;
  -ms-animation-delay: 0.2s;
  -o-animation-delay: 0.2s;
          animation-delay: 0.2s;
  -webkit-animation-fill-mode:forwards;
  -moz-animation-fill-mode:forwards;
  -mz-animation-fill-mode:forwards;
  -o-animation-fill-mode:forwards;
          animation-fill-mode:forwards;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CSS draw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

#draw-css {
  overflow: hidden;
  position: absolute;
  opacity: 0;
  filter: alpha(opacity=0);
  background:#c4e0db;
  border: 2px solid #500D01;
  left: 50%;
  top: 50%;
  -webkit-transform: translateX(-50%) translateY(-50%);
      -ms-transform: translateX(-50%) translateY(-50%);
     -moz-transform: translateX(-50%) translateY(-50%);
       -o-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
  width: 1000px;
  height: 700px;
  -webkit-animation: css-appear 6s linear;
  -moz-animation: css-appear 6s linear;
  -ms-animation: css-appear 6s linear;
  -o-animation: css-appear 6s linear;
          animation: css-appear 6s linear;
  -webkit-animation-delay: 5s;
  -moz-animation-delay: 5s;
  -ms-animation-delay: 5s;
  -o-animation-delay: 5s;
          animation-delay: 5s;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  -ms-animation-fill-mode: forwards;
  -o-animation-fill-mode: forwards;
          animation-fill-mode: forwards;
}
 
K

kelvinac

css part 2

Mã:
#spaceship {
  position: absolute;
  width:100%;
  height: 100%;
  -webkit-animation: spaceship 2s linear infinite alternate;
  -moz-animation: spaceship 2s linear infinite alternate;
  -ms-animation: spaceship 2s linear infinite alternate;
  -o-animation: spaceship 2s linear infinite alternate;
          animation: spaceship 2s linear infinite alternate;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Overlay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

#overlay {
  top: 0;
  left: 0;
  position: absolute;
  width: 1000px;
  height: 700vh;
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/194136/overlay.png')
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ground
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.ground {
  position: relative;
  width: 1000px;
  height: 200px;
  background-color: #d8b497;
  top: 550px;
  left: 0;
}

.ground:before {
  content:'';
  display: block;
  width: 1000px;
  height: 5px;
  background-color: #BD9A7A ;
  left: 0px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clouds
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

/*.cloud1 {
  position: absolute;
  background-color: #e1e6e0;
  width: 57px;
  height: 16px;
  top: 320px;
  left: -200px;
  border-top-left-radius: 99%;
  animation: cloud 10s linear infinite;
}

.cloud1:before {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 80px;
  height: 32px;
  top: -16px;
  left: 50px;
  border-top-left-radius: 80%;
  border-top-right-radius: 80%;
}

.cloud1:after {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 47px;
  height: 16px;
  top: 0px;
  left: 124px;
  border-top-right-radius: 99%;
}*/

.cloud2 {
  position: absolute;
  background-color: #e1e6e0;
  width: 57px;
  height: 16px;
  top: 279px;
  left: -200px;
  border-top-left-radius: 99%;
  -webkit-animation: cloud 8s linear infinite;
  -moz-animation: cloud 8s linear infinite;
  -ms-animation: cloud 8s linear infinite;
  -o-animation: cloud 8s linear infinite;
          animation: cloud 8s linear infinite;
}

.cloud2:before {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 80px;
  height: 32px;
  top: -16px;
  left: 50px;
  border-top-left-radius: 80%;
  border-top-right-radius: 80%;
}

.cloud2:after {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 47px;
  height: 16px;
  top: 0px;
  left: 124px;
  border-top-right-radius: 99%;
}
 
K

kelvinac

css part 3

Mã:
.cloud3 {
  position: absolute;
  background-color: #e1e6e0;
  width: 57px;
  height: 16px;
  top: 170px;
  left: -200px;
  border-top-left-radius: 99%;
  -webkit-animation: cloud 13s linear infinite;
  -moz-animation: cloud 13s linear infinite;
  -ms-animation: cloud 13s linear infinite;
  -o-animation: cloud 13s linear infinite;
          animation: cloud 13s linear infinite;
}

.cloud3:before {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 80px;
  height: 32px;
  top: -16px;
  left: 50px;
  border-top-left-radius: 80%;
  border-top-right-radius: 80%;
}

.cloud3:after {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 47px;
  height: 16px;
  top: 0px;
  left: 124px;
  border-top-right-radius: 99%;
}

.cloud4 {
  position: absolute;
  background-color: #e1e6e0;
  width: 57px;
  height: 16px;
  top: 230px;
  left: -200px;
  border-top-left-radius: 99%;
  -webkit-animation: cloud 16s linear infinite;
 -moz-animation: cloud 16s linear infinite;
  -ms-animation: cloud 16s linear infinite;
   -o-animation: cloud 16s linear infinite;
          animation: cloud 16s linear infinite;
}

.cloud4:before {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 80px;
  height: 32px;
  top: -16px;
  left: 50px;
  border-top-left-radius: 80%;
  border-top-right-radius: 80%;
}

.cloud4:after {
  content:'';
  position: absolute;
  background-color: #e1e6e0;
  width: 47px;
  height: 16px;
  top: 0px;
  left: 124px;
  border-top-right-radius: 99%;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reactor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.reactor-projector1-t {
  position: absolute;
  top: 360px;
  left: 660px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector1-t:before {
  content:'';
  position: absolute;
  top: -11px;
  left: -2px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector1-t:after {
  content:'';
  position: absolute;
  top: 8px;
  left: -2px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector2-t {
  position: absolute;
  top: 379px;
  left: 660px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector-t {
  content:'';
  position: absolute;
  top: 351px;
  left: 662px;
  width: 2px;
  height: 33px;
  background-color: #500D01;
}

.reactor-projector3-t {
  content:'';
  position: absolute;
  top: 351px;
  left: 664px;
  width: 19px;
  height: 30px;
  border-right: 2px solid #500D01;
  border-top: 2px solid #500D01;
  border-bottom: 2px solid #500D01;
  background-color: #7c7d7f;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

.reactor-projector3-t:before {
  content:'';
  position: absolute;
  top: 20px;
  left: -2px;
  width: 20px;
  height: 10px;
  background-color: #4c4c4e;
  border-bottom-right-radius: 50%;
  border-top-left-radius: 100%;
}

.reactor-projector1-b {
  position: absolute;
  top: 406px;
  left: 660px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector1-b:before {
  content:'';
  position: absolute;
  top: -11px;
  left: -2px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector1-b:after {
  content:'';
  position: absolute;
  top: 8px;
  left: -2px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector2-b {
  position: absolute;
  top: 425px;
  left: 660px;
  width: 10px;
  height: 2px;
  border: 2px solid #500D01;
  background-color: #7c7d7f;
}

.reactor-projector-b {
  content:'';
  position: absolute;
  top: 398px;
  left: 662px;
  width: 2px;
  height: 33px;
  background-color: #500D01;
}

.reactor-projector3-b {
  content:'';
  position: absolute;
  top: 397px;
  left: 664px;
  width: 19px;
  height: 30px;
  border-right: 2px solid #500D01;
  border-top: 2px solid #500D01;
  border-bottom: 2px solid #500D01;
  background-color: #7c7d7f;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

.reactor-projector3-b:before {
  content:'';
  position: absolute;
  top: 20px;
  left: -2px;
  width: 20px;
  height: 10px;
  background-color: #4c4c4e;
  border-bottom-right-radius: 50%;
  border-top-left-radius: 100%;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sun
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.sun {
  width: 80px;
  height: 80px;
  position: absolute;
  top: 80px;
  left: 120px;
  background-color: #e5f0ec;
  border-radius: 50%;
  -webkit-animation: sun 3s linear infinite alternate;
  -moz-animation: sun 3s linear infinite alternate;
  -ms-animation: sun 3s linear infinite alternate;
  -o-animation: sun 3s linear infinite alternate;
            animation: sun 3s linear infinite alternate;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dust
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

#dust1 {
  opacity: 0.6;
  filter: alpha(opacity=60);
}

#dust2 {
  opacity: 0.8;
  filter: alpha(opacity=80);
}

#dust3 {
  opacity: 0.9;
  filter: alpha(opacity=90);
}

#dust4 {
  opacity: 0.5;
  filter: alpha(opacity=50);
}

.dust1-part1 {
  position: absolute;
  background-color: #a88363;
  top: 536px;
  left: 709px;
  width: 100px;
  height: 54px;
  border-top-left-radius: 100%;
}

.dust1-part1:before {
  content:'';
  position: absolute;
  background-color: #a88363;
  top: -38px;
  left: 35px;
  width: 87px;
  height: 92px;
  border-top-left-radius: 50%;
}

.dust1-part1:after {
  content:'';
  position: absolute;
  background-color: #a88363;
  top: -70px;
  left: 93px;
  width: 88px;
  height: 124px;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.dust1-part2 {
  position: absolute;
  background-color: #a88363;
  top: 497px;
  left: 884px;
  width: 88px;
  height: 93px;
  border-top-right-radius: 78%;
}

.dust2-part1 {
  position: absolute;
  background-color: #ba9c80;
  top: 546px;
  left: 625px;
  width: 60px;
  height: 44px;
  border-top-left-radius: 100%;
}

.dust2-part1:before {
  content:'';
  position: absolute;
  background-color: #ba9c80;
  top: -26px;
  left: 36px;
  width: 78px;
  height: 70px;
  border-top-left-radius: 100%;
}

.dust2-part1:after {
  content:'';
  position: absolute;
  background-color: #ba9c80;
  top: -53px;
  left: 107px;
  width: 95px;
  height: 97px;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.dust2-part2 {
  position: absolute;
  background-color: #ba9c80;
  top: 517px;
  left: 814px;
  width: 75px;
  height: 73px;
  border-top-right-radius: 100%;
}

.dust2-part2:after {
  content:'';
  position: absolute;
  background-color: #ba9c80;
  top: 33px;
  left: 52px;
  width: 60px;
  height: 40px;
  border-top-right-radius: 100%;
}
 
K

kelvinac

mình sr nha =_= mình quên lưu code đó nên mất hết trơn rồi, các cậu có thể truy cập vào demo và bấm Ctrl+U để lấy code :D
 
Top Bottom