webdesign:html5
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| webdesign:html5 [2015/11/07 15:14] – [css to less] admin | webdesign:html5 [2016/01/14 04:29] (current) – removed admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== HTML5 ====== | ||
| - | ===== Understand about HTML5 ===== | ||
| - | ==== HTML5 Browser Support ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | HTML5 browser support: | ||
| - | * HTML5 is **supported in all modern browsers**. | ||
| - | * In addition, all browsers, **old and new, automatically handle unrecognized elements as inline elements**. Because of this, you can **" | ||
| - | ===== Javascript tools ===== | ||
| - | |||
| - | ==== npm(package manager for javascript...) ==== | ||
| - | refer: https:// | ||
| - | ==== bower(package manager for the web) ==== | ||
| - | refer: http:// | ||
| - | Web sites are made of lots of things — **frameworks, | ||
| - | * Install bower< | ||
| - | npm install -g bower | ||
| - | </ | ||
| - | * Using bower to search all libraries which contain the word **" | ||
| - | bower search jquery | ||
| - | </ | ||
| - | ............................... | ||
| - | jquery-autogrow-textarea git:// | ||
| - | jquery-formchecker git:// | ||
| - | inview-jquery-plugin git:// | ||
| - | good-form git:// | ||
| - | jquery-fivehundredpx git:// | ||
| - | ............................... | ||
| - | </ | ||
| - | * Create bower.json from **bower_components** in project< | ||
| - | bower init | ||
| - | </ | ||
| - | * Install all packages which were configured in bower.json to **bower_components**< | ||
| - | bower install | ||
| - | </ | ||
| - | * Install single package to your project(You must **install git** before run **bower install**):< | ||
| - | bower install < | ||
| - | </ | ||
| - | bower install good-form | ||
| - | </ | ||
| - | ==== Grunt(Javascript Task Runner) ==== | ||
| - | refer: http:// | ||
| - | ==== Node.js ==== | ||
| - | refer: https:// | ||
| - | Node.js® is a platform built on **Chrome' | ||
| - | ==== Dust ==== | ||
| - | refer: http:// | ||
| - | ===== CSS tools ===== | ||
| - | ==== Sass(CSS pre-processor which wroten with Ruby Language) ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * http:// | ||
| - | Install: | ||
| - | * http:// | ||
| - | Sass is an extension of CSS that adds power and elegance to the basic language. It allows you to use **variables, | ||
| - | |||
| - | Install sass with ruby: | ||
| - | - Step1: download and install Ruby from http:// | ||
| - | - Step2: install sass with gem tool:< | ||
| - | gem install sass | ||
| - | gem install compass | ||
| - | </ | ||
| - | Using sass: | ||
| - | * display options of sass command:< | ||
| - | sass --help | ||
| - | </ | ||
| - | * compile sass to css:< | ||
| - | sass input.scss output.css | ||
| - | </ | ||
| - | * compass help:< | ||
| - | compass --help | ||
| - | </ | ||
| - | Primary Commands: | ||
| - | * clean - Remove generated files and the sass cache | ||
| - | * compile | ||
| - | * create | ||
| - | * init - Add compass to an existing project | ||
| - | * watch - Compile Sass stylesheets to CSS when they change | ||
| - | </ | ||
| - | * Using compass to compile sass to css(base on **config.rb** file):< | ||
| - | compass compile | ||
| - | </ | ||
| - | Install User-defined language scss to edit with **notepad++** : | ||
| - | - Step1: download user-defined language for scss from https:// | ||
| - | - Step2: Go to **Language-> | ||
| - | - Step3: go to your Notepad++ folder then to **plugins/ | ||
| - | ==== Less(CSS pre-processor which wroten with Javascript Language) ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * less editor: http:// | ||
| - | Less is a **CSS pre-processor**, | ||
| - | |||
| - | Less(less.js) **runs inside Node**, in the browser and **inside Rhino**. There are also many 3rd party tools that allow you to compile your files and watch for changes. | ||
| - | |||
| - | Install less:< | ||
| - | npm install -g less | ||
| - | </ | ||
| - | Compile less file to css:< | ||
| - | lessc styles.less > styles.css | ||
| - | </ | ||
| - | Basic about less language: | ||
| - | * Variables: less content< | ||
| - | @nice-blue: #5B83AD; | ||
| - | @light-blue: | ||
| - | |||
| - | #header { | ||
| - | color: @light-blue; | ||
| - | } | ||
| - | </ | ||
| - | #header { | ||
| - | color: #6c94be; | ||
| - | } | ||
| - | </ | ||
| - | * Mixins: | ||
| - | .bordered { | ||
| - | border-top: dotted 1px black; | ||
| - | border-bottom: | ||
| - | }And we want to **use these properties inside other rule-sets**. Well, we just have to drop in the name of the class where we want the properties, like so:<code css> | ||
| - | #menu a { | ||
| - | color: #111; | ||
| - | .bordered; | ||
| - | } | ||
| - | |||
| - | .post a { | ||
| - | color: red; | ||
| - | .bordered; | ||
| - | } | ||
| - | </ | ||
| - | * Nested rules: Less gives you the ability to use **nesting** instead of, or **in combination with cascading**. Let's say we have the following **CSS**:< | ||
| - | #header { | ||
| - | color: black; | ||
| - | } | ||
| - | #header .navigation { | ||
| - | font-size: 12px; | ||
| - | } | ||
| - | #header .logo { | ||
| - | width: 300px; | ||
| - | } | ||
| - | </ | ||
| - | #header { | ||
| - | color: black; | ||
| - | .navigation { | ||
| - | font-size: 12px; | ||
| - | } | ||
| - | .logo { | ||
| - | width: 300px; | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | .clearfix { | ||
| - | display: block; | ||
| - | zoom: 1; | ||
| - | |||
| - | &:after { | ||
| - | content: " "; | ||
| - | display: block; | ||
| - | font-size: 0; | ||
| - | height: 0; | ||
| - | clear: both; | ||
| - | visibility: hidden; | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | ==== Compat Framework ==== | ||
| - | refer: http:// | ||
| - | ==== css to less ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * https:// | ||
| - | * https:// | ||
| - | * https:// | ||
| - | ==== intern ==== | ||
| - | refer: https:// | ||
| - | ===== Bootstrap ===== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | Bootstrap is the most popular **HTML, CSS, and JS framework** for developing responsive, mobile first projects on the web | ||
| - | ==== Build bootstrap from source with gruntjs ==== | ||
| - | === Install some basic tool before build === | ||
| - | - Step1: Install **npm** tool by **install nodejs** to d: | ||
| - | - Step2: Install **grunt**(Package Manager for Javascript):< | ||
| - | npm install -g grunt-cli | ||
| - | </ | ||
| - | === Build Bootstrap === | ||
| - | - Step1: Navigate to the **root /bootstrap/ directory**, | ||
| - | npm install | ||
| - | </ | ||
| - | - Step2: Regenerates the /dist/ directory with compiled and minified CSS and JavaScript files< | ||
| - | grunt dist | ||
| - | </ | ||
| - | ==== Create custom style ==== | ||
| - | You can create a **custom navbar class**(navbar-custom), | ||
| - | <code html> | ||
| - | <nav class=" | ||
| - | <div class=" | ||
| - | <button type=" | ||
| - | </ | ||
| - | <a class=" | ||
| - | </ | ||
| - | ... | ||
| - | </ | ||
| - | </ | ||
| - | CSS | ||
| - | <code css> | ||
| - | .navbar-custom { | ||
| - | background-color:# | ||
| - | color:# | ||
| - | border-radius: | ||
| - | } | ||
| - | |||
| - | .navbar-custom .navbar-nav > li > a { | ||
| - | color:#fff; | ||
| - | } | ||
| - | .navbar-custom .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus { | ||
| - | color: #ffffff; | ||
| - | background-color: | ||
| - | } | ||
| - | .navbar-custom .navbar-brand { | ||
| - | color:# | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | ==== Create custom style for bootstrap with less ==== | ||
| - | === Advantages of this method === | ||
| - | Using Less, especially with Bootstrap 3, gives you a few advantages that really make it a awesome choice | ||
| - | |||
| - | Advantages of less language: | ||
| - | * Changing variables in one place can have wide-reaching effects, for super easy global customization | ||
| - | * Augment, shift, and change existing styles and variables, or roll your own | ||
| - | * Componentization. You can break your Less up into smaller files for very easy editing and separation, great for applications where you’re using version control like GitHub | ||
| - | Advantages of importing bootstrap.less: | ||
| - | * Have a clean, customized singular CSS file | ||
| - | * You can easily comment out any part of Bootstrap you don’t need or want, right down to the single line | ||
| - | * Easily override Bootstrap variables/ | ||
| - | * We can easily **reused the variables and mixins** of bootstrap in new styles, for example< | ||
| - | .main-content { | ||
| - | .make-row(); | ||
| - | .sidebar { | ||
| - | padding: 20px; | ||
| - | @media(min-width: | ||
| - | padding: 30px; | ||
| - | } | ||
| - | h2 { | ||
| - | font-size: 20px; | ||
| - | @media(min-width: | ||
| - | font-size: 30px | ||
| - | } | ||
| - | } | ||
| - | .make-sm-column(2); | ||
| - | .make-md-column(3); | ||
| - | } | ||
| - | .content-area { | ||
| - | line-height: | ||
| - | @media(min-width: | ||
| - | line-height: | ||
| - | } | ||
| - | h1 { | ||
| - | font-size: 30px; | ||
| - | @media(min-width: | ||
| - | font-size: 40px; | ||
| - | } | ||
| - | } | ||
| - | .make-sm-column(10); | ||
| - | .make-md-column(9); | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | === Custom css with less file which don't change variables of bootstrap.less === | ||
| - | We **create the new less file** and using **less tool** to rebuild new less file | ||
| - | - Step1: Create **style.less** which import **bootstrap** and other changes in **nav.less, header.less, | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | </ | ||
| - | - Step2: create files **variables.less, | ||
| - | - Step3: Using less tool to compile style.css< | ||
| - | lessc style.less > style.css | ||
| - | </ | ||
| - | === Custom css with less file and change variables of bootstrap.less === | ||
| - | refer: http:// | ||
| - | - Step1: create custom-variables.less:< | ||
| - | // Single primary color that all mixins use. Str8 ballin. | ||
| - | @primary: | ||
| - | |||
| - | // Primary Variants - | ||
| - | @primaryLight: | ||
| - | @primaryDark: | ||
| - | @primaryFaded: | ||
| - | |||
| - | // 180degree Variants | ||
| - | @variant: | ||
| - | @variantLight: | ||
| - | @variantDark: | ||
| - | @variantFaded: | ||
| - | |||
| - | // 90degree Variants | ||
| - | @corner: | ||
| - | @cornerLight: | ||
| - | @cornerDark: | ||
| - | @cornerFaded: | ||
| - | </ | ||
| - | - Step2: create **styles.less** which import **custom-variables.less** and other less files of bootstrap(We create this file by **editing | ||
| - | // Core variables and mixins | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | // Reset and dependencies | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | // Core CSS | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | // Components | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | // Components w/ JavaScript | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | // Utility classes | ||
| - | @import " | ||
| - | @import " | ||
| - | |||
| - | </ | ||
| - | ==== Themes for bootstrap ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * https:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | * http:// | ||
| - | ==== Build less file in bootswatch ==== | ||
| - | Create below script to build all less file in bootswatch(Base on https:// | ||
| - | #!/bin/sh | ||
| - | |||
| - | set -e | ||
| - | |||
| - | cd bootstrap_themes/ | ||
| - | for theme in *; do | ||
| - | if [ -d " | ||
| - | mkdir -p " | ||
| - | lessc " | ||
| - | recess --compress " | ||
| - | fi | ||
| - | done | ||
| - | </ | ||
| - | ===== Javascript Resources which support for designer ===== | ||
| - | ==== Respond.js ==== | ||
| - | Respond.js: https:// | ||
| - | ==== Modernizr ==== | ||
| - | Modernizr – http:// | ||
| - | ===== UI Kits ===== | ||
| - | ==== Flat UI ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * https:// | ||
| - | |||
| - | |||
| - | ==== Boot Flat ==== | ||
| - | refer: | ||
| - | * http:// | ||
| - | * https:// | ||
webdesign/html5.1446909281.txt.gz · Last modified:  (external edit)
                
                