工具:typora
1. 設置圖片大小(本節引用自 https://support.typora.io/Resize-Image/)
Typora允許使用<img>標簽顯示圖像,也可用於調整圖像的大小。
例如,您可以指定標記的屬性width或height屬性<img>,或在其style屬性中設置寬度/高度:
<img src="https://www.google.com/doodles/kamma-rahbeks-241st-birthday" width="200px" />
<!--or-->
<img src="https://www.google.com/doodles/kamma-rahbeks-241st-birthday" style="height:200px" />
另一個常見的用例是,當您嘗試插入視網膜圖像,並希望將其縮放為“正確”尺寸時,您可以zoom在其style屬性中指定一個因子。
<img src="https://www.google.com/doodles/kamma-rahbeks-241st-birthday" style="zoom:50%" />
Typora可以理解和顯示上述語法。雖然您可以在其style屬性中設置其他css屬性,但在Typora編輯或預覽時會忽略它們,但可能會影響導出的HTML或PDF。
2. 設置圖片位置(center/right/left)(使用HTML式樣)
<div align=center>
![]()
</div>
<!--or->
<div align=center>
<img src="" width="">
</div>
