How to detect disabled JavaScript
Use the Noscript element
<noscript> <h1>No JavaScript!</h1> </noscript>
Use the scripting CSS media feature
/* Scripting is completely unavailable on the current document */ @media (scripting: none) { /* ... */ } /* Scripting is enabled during the initial page load, but not afterwards */ @media (scripting: initial-only) { /* ... */ } /* Scripting is supported and active on the current document */ @media (scripting: enabled) { /* ... */ }
This is an experimental technology. Some browsers don’t support it.
CSS高宽不等图片固定比例布局的三重进化
百分比 padding
aspect-ratio 属性
cqw 单位