• Giao hàng miễn phí toàn quốc - TP HCM giao tận nơi
  • Balo PGYTECH ONE GO AIR - ONE MO 2
  • Smallrig phụ kiện hỗ trợ quay điện thoại Iphone
  • Smallrig phụ kiện cage, l plate, rig, tools
  • Tilta Phụ kiện chính hãng
  • Phụ kiện Gopro 11 10 9 8 7 6 5

20 thủ thuật CSS dành cho người mới bắt đầu học

Khi bạn thiết kế website thì ngoài phần html thì css là thành phần quan trọng thứ 2, 1 website đẹp, code gọn thì bạn cần phải nắm rõ cấu trúc và syntax của css ! Dưới đây là 20 thủ thuật và bạn nên áp dụng ngay trong file css của bạn !

  1. Use reset.css

    When it comes to rendering CSS styles, browsers like Firefox and Internet Explorer have different ways of handling them. reset.css resets all fundamental styles, so you starts with a real blank new stylesheets.

    Here are few commonly used reset.css frameworks – Yahoo Reset CSS, Eric Meyer’s CSS Reset, Tripoli

  2. Use Shorthand CSS

    Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all – it makes the code clearner and easier to understand.

    Instead of creating CSS like this

    1. .header {
        
    2.       background-color#fff;
        
    3.       background-imageurl(image.gif);
        
    4.       background-repeatno-repeat;
        
    5.       background-positiontop left
        
    6.     }  

    It can be short-handed into the following:

    1. .header {
        
    2.       background#fff url(image.gif) no-repeat top left
        
    3.     }  

    MoreIntroduction to CSS Shorthand, Useful CSS shorthand properties

  3. Understanding Class and ID

    These two selectors often confuse beginners. In CSS, class is represented by a dot "." while id is a hash ‘#". In a nutshell id is used on style that is unique and don’t repeat itself, class on the other side, can be re-use.

    MoreClass vs. ID | When to use Class, ID | Applying Class and ID together

  4. Power of
  5. a.k.a link list, is very useful when they are use correctly with
      or
Go Top
Chat hỗ trợ
Chat ngay