User Tools

Site Tools


html_and_css

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
html_and_css [2018/12/29 17:19]
admin
html_and_css [2021/07/23 23:56] (current)
admin
Line 1: Line 1:
-#html+#HTML
  
-### insert html code from another file+## Basic 
 + - **Block elements vs inline elements.** https://​www.w3schools.com/​html/​html_blocks.asp 
 + - **Checkbox** https://​www.tunnelsup.com/​jquery-checkbox-checked-reading-and-setting/​ 
 + 
 +## add favicon to website 
 +``` 
 +<link rel="​icon"​  
 +      type="​image/​png"​  
 +      href="​http://​example.com/​myicon.png">​ 
 +``` 
 + 
 + 
 +## insert html code from another file
 ref: https://​stackoverflow.com/​questions/​8988855/​include-another-html-file-in-a-html-file ref: https://​stackoverflow.com/​questions/​8988855/​include-another-html-file-in-a-html-file
  
Line 47: Line 59:
 ``` ```
 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://​gist.github.com/​Tafkadasoh/​334881e18cbb7fc2a5c033bfa03f6ee6 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://​gist.github.com/​Tafkadasoh/​334881e18cbb7fc2a5c033bfa03f6ee6
 +
 +{{ ::​html_to_js.zip |}}
 +
 +Solution 3. Use htm file and ```frameset```
  
  
 #CSS #CSS
  
-###​在html中使用external stylesheet:  ​+##​在html中使用external stylesheet:  ​
 ```<link rel="​stylesheet"​ type="​tex/​css"​ href="​LSstyle.css">​``` ```<link rel="​stylesheet"​ type="​tex/​css"​ href="​LSstyle.css">​```
  
-###​不同的vhost共用stylesheet的方法:​在每个vhost里面建立symbolic link+##​不同的vhost共用stylesheet的方法:​在每个vhost里面建立symbolic link
 ```ln -s /​home/​wwwroot/​LSstyle.css LSstyle.css``` ​ ```ln -s /​home/​wwwroot/​LSstyle.css LSstyle.css``` ​
  
-###不同的开头+### Class vs ID
  
 1. define an **id**  ​ 1. define an **id**  ​
Line 67: Line 83:
 ```img.roundedCorner6px{ border-radius:​6px;​ overflow:​hidden;​ }``` ```img.roundedCorner6px{ border-radius:​6px;​ overflow:​hidden;​ }```
  
-两者似乎可以互相替换:[[https://​www.w3schools.com/code/tryit.asp?​filename=FYJD2ER45BQL]]   +class可以用于各种元素,但id只针对一个元素:[[https://​www.htmldog.com/guides/​css/​intermediate/​classid/]]   
-但是class的定义方法必须得指定tag,不如id来得通用[?​] ​++++ Code Example|+ 
 +++++ Code Example|
  
 ``` ```
html_and_css.1546075188.txt.gz · Last modified: 2018/12/29 17:19 by admin