Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
devwiki:html [2021/08/28 07:37] – [css file not loading] ying | devwiki:html [2023/02/07 18:21] (current) – [HTML5 Elements (Widgets)] ying | ||
---|---|---|---|
Line 26: | Line 26: | ||
< | < | ||
<meta charset=" | <meta charset=" | ||
+ | <meta name=" | ||
</ | </ | ||
< | < | ||
Line 51: | Line 52: | ||
* 12 or 16 grid system | * 12 or 16 grid system | ||
+ | **Responsive Elements** | ||
+ | |||
+ | * responsive image map: | ||
+ | * image map basic and tool | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * (works) https:// | ||
+ | * https:// | ||
+ | * (works) js method to recalculate map when image resize (need to call when image visible): https:// | ||
+ | * (not sure, not on attemp) instead map, it use generated svg method: https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * (similar js but old) https:// | ||
+ | * https:// | ||
**CSS Pre-processor** | **CSS Pre-processor** | ||
* SASS/ | * SASS/ | ||
Line 128: | Line 143: | ||
</ | </ | ||
+ | |||
+ | ** center image in div** | ||
+ | * horizontal center image, just put div text-align as center <code css> | ||
+ | * another way is to put image to respond to div center, margin itself, and it need to be block not inline to have margin <code css> | ||
+ | * 3rd method is to use latest div tech, flex, put div as flex< | ||
+ | .div_name{ | ||
+ | display: flex; | ||
+ | justify-content: | ||
+ | } | ||
+ | </ | ||
+ | * in 3rd method, as it is like hbox default, those elements inside div is like widget in UI, to align those widgets together, set align-items in .div_name <code css> | ||
+ | .div_name{ | ||
+ | display: flex; | ||
+ | justify-content: | ||
+ | align-items: | ||
+ | } | ||
+ | </ | ||
====== HTML 5 - Interactive Charts and Canvas ====== | ====== HTML 5 - Interactive Charts and Canvas ====== | ||
Line 192: | Line 224: | ||
} | } | ||
} | } | ||
+ | </ | ||
+ | |||
+ | ===== html select dropdown and remove focus ===== | ||
+ | * problem: when select dropdown, the select focus still stuck on the dropdown list, (when you press arrow key) | ||
+ | * solution: to remove focus after choose, add onchange event and remove its focus <code javascript> | ||
+ | const choice_input = document.querySelector(" | ||
+ | choice_input.onchange = function(event){ | ||
+ | choice_input.blur() // remove focus from this input | ||
+ | } | ||
+ | // also if you have onload function, you can add this to onload to reset last choice when refresh browser | ||
+ | const tmp_choice_input= document.querySelector(" | ||
+ | tmp_choice_input.selectedIndex = " | ||
</ | </ |