Using only width or height attribute for <img> element to let the browser conserve the natural width and height ratio of the image.
Using bootstrap to mark different HTML elements with specific classes provided by bootstrap to style those HTML elements with CSS. The website https://getbootstrap.com/ maintains a good documentation. A user can copy code snippets from this website and experiment on his own.
https://lipsum.com/ for generating dummy texts.
The author's personal website can be found on www.johnelder.org
使用Bootstrap优化HTML元素样式

本文探讨了如何利用Bootstrap框架标记HTML元素,并保持图片的自然宽高比,同时介绍了几个实用资源,如lipsum.com用于生成占位文本。

被折叠的 条评论
为什么被折叠?



