html_and_css
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| html_and_css [2018/12/26 02:20] – 60.239.56.126 | html_and_css [2021/07/23 23:56] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | #html | + | #HTML |
| + | |||
| + | ## Basic | ||
| + | - **Block elements vs inline elements.** https:// | ||
| + | - **Checkbox** https:// | ||
| + | |||
| + | ## add favicon to website | ||
| + | ``` | ||
| + | <link rel=" | ||
| + | type=" | ||
| + | href=" | ||
| + | ``` | ||
| + | |||
| + | |||
| + | ## insert html code from another file | ||
| + | ref: https:// | ||
| + | |||
| + | Solution 1. Use jQuery.js | ||
| + | ``` | ||
| + | < | ||
| + | < | ||
| + | <script src=" | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | <div id=" | ||
| + | </ | ||
| + | </ | ||
| + | ``` | ||
| + | |||
| + | Solution 2. Use a custom javascript | ||
| + | |||
| + | a.html: | ||
| + | ``` | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | ... | ||
| + | |||
| + | <script src=" | ||
| + | |||
| + | ... | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | ``` | ||
| + | b.js: | ||
| + | ``` | ||
| + | document.write(' | ||
| + | < | ||
| + | < | ||
| + | demonstrated in this code listing.\ | ||
| + | </ | ||
| + | '); | ||
| + | |||
| + | ``` | ||
| + | Or just use the following handy bash script published as a Gist on Github, that automates all necessary work, converting b.html to b.js: https:// | ||
| + | |||
| + | {{ :: | ||
| + | |||
| + | Solution 3. Use htm file and ```frameset``` | ||
| #CSS | #CSS | ||
| - | ### | + | ## |
| ```<link rel=" | ```<link rel=" | ||
| - | ### | + | ## |
| ```ln -s / | ```ln -s / | ||
| - | ###不同的开头: | + | ### Class vs ID: |
| 1. define an **id** | 1. define an **id** | ||
| Line 20: | Line 83: | ||
| ```img.roundedCorner6px{ border-radius: | ```img.roundedCorner6px{ border-radius: | ||
| - | 两者似乎可以互相替换:[[https:// | + | class可以用于各种元素,但id只针对一个元素:[[https:// |
| - | 但是class的定义方法必须得指定tag,不如id来得通用[? | + | |
| + | ++++ Code Example| | ||
| ``` | ``` | ||
| Line 55: | Line 119: | ||
| ++++ | ++++ | ||
| + | |||
| + | <wrap lo> | ||
| + | * CSS dropdown menu https:// | ||
| + | </ | ||
html_and_css.1545762032.txt.gz · Last modified: (external edit)
