<address> <article> <aside> <blockquote> <canvas> <dd> <div> <dl> <dt> <fieldset> <figcaption> <figure> <footer> <form> <h1>-<h6> <header> <hr> <li> <main> <nav> <noscript> <ol> <p> <pre> <section> <table> <tfoot> <ul> <video>
<a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <label> <map> <object> <output> <q> <samp> <script> <select> <small> <span> <strong> <sub> <sup> <textarea> <time> <tt> <var>
根據上表格,以及 W3C 給的資訊,img 是 inline elements
但卻可以執行寬高的設定,這看起來並不合理?
inline-block 的屬性:
inline 屬性: 根據物件的 content 來產生寬高。無法設定
block 屬性: 預設寬度為:100% (for 瀏覽器),可自行設定
而 inline-block 則同時具備上面兩種條件。
img // 圖片 input button select // 下拉式選單? textarea // 留言輸入框
2022 網頁開發全攻略教程 / CSS篇章 - other
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up