Markdown进阶


文章目录

  • Markdown进阶
  • 1.更改字体大小
  • 2.文字排版
  • 3.字体颜色
  • 4.字体修改
  • 5.背景颜色
  • 6.图片排版
  • 7.表格进阶


1.更改字体大小

<font size=1>一级字体大小</font>

一级字体大小

<font size=7>这是七级字体大小</font>

这是七级字体大小

<font size=77>这是七十七级字体大小</font>

这是七十七级字体大小


要是频繁调整字体大小就要不断输入标签,markdown支持一个快速补全功能

先输入接着打出</就会自动补全。


字体可以在1~7级调整超过七级默认七级大小

而不调整的话默认三级

<font size=3>这是三级字体大小</font>

这是三级字体大小

还发现输入一定大小的值以后会变成一级字体

<font size = 74182378238>哈哈哈哈</font>

哈哈哈哈

经过一番测试以后发现最大值为231-1,int 型数值的最大值,超过这个界限就是1级字体了

<font size = 2147483647>哈哈哈哈</font>

哈哈哈哈

<font size = 2147483648>哈哈哈哈</font>

哈哈哈哈

2.文字排版

<center>我想在中间</center>


我想在中间

<div align='center'>我也是中间人</div>


我也是中间人


注:<div>标签不具有什么效果,只定义这个区域是一个模块或者 分区<div>

<div align='right'>我在右边</div>


我在右边


<div align='left'>我在左边</div>


我在左边


3.字体颜色

<font color=red>我是红色的耶</font>

我是红色的耶

<font color=green>我是绿色的耶</font>

我是绿色的耶

<font color=greed>我是greed色的耶</font>

我是greed色的耶

查了一下颜色英文单词

Gray (灰)白色

积极:Elegance, humility, respect, reverence, stability, subtlety, timelessness, wisdom
消极:Anachronism, boredom, decay, decrepitude, dullness, dust, pollution, urban sprawl

White 白色

积极:Reverence, purity, snow, peace, innocence, cleanliness, simplicity, security, humility, marriage, sterility, winter
消极:Coldness, sterility, clinicism, surrender, cowardice, fearfulness, winter, unimaginative

Black 黑色
积极:Modernity, power, sophistication, formality, elegance, wealth, mystery, style
消极:Evil, death, fear, anonymity, anger, sadness, remorse, mourning, unhappiness, mystery

Red 红色
积极:Passion, strength, energy, fire, love, sex, excitement, speed, heat, leadership, masculinity, power
消极:Danger, fire, gaudiness, blood, war, anger, revolution, radicalism, aggression, stop

Blue 蓝色
积极:Seas, skies, peace, unity, harmony, tranquility, calmness, coolness, confidence, water, ice, loyalty, conservatism, dependability, cleanliness, technology, winter
消极:Depression, coldness, conservatism, idealism, obscenity, ice, tackiness, winter

Green 绿色

积极:Nature, spring, fertility, youth, environment, wealth, money (US), good luck, vigor, generosity, go, grass
消极:Aggression, inexperience, envy, misfortune, jealousy, money, illness, greed

Yellow 黄色

积极:Sunlight, joy, happiness, optimism, liberalism, idealism, wealth (gold), summer, hope, air
消极:Cowardice, illness (quarantine), hazards, dishonesty, liberalism, avarice, ossification, weakness, greed

Purple紫色

积极:Sensuality, spirituality, creativity, wealth, royalty, nobility, ceremony, mystery, wisdom, enlightenment
消极:Arrogance, flamboyance, gaudiness, mourning, profanity, exaggeration, confusion

Orange 橙色

积极:Buddhism, energy, balance, heat, fire, enthusiasm, flamboyance, playfulness
消极:Aggression, arrogance, flamboyance, gaudiness, over emotion, warning, danger, fire

Brown 铜色

积极:Calm, depth, natural organisms, nature, richness, rusticism, stability, tradition
消极:Anachronism, boorishness, dirt, dullness, filth, heaviness, poverty, roughness

除了支持单词定义颜色还支持十六进制定义颜色

<font color=#ff0000>我是红色的耶</font>

我是红色的耶

<font color=#00ff00>我是绿色的耶</font>

我是绿色的耶

<font color=#0000ff>我是蓝色的耶</font>

我是蓝色的耶

众所周知,自然界所有元素都可以有三原色红绿蓝混合而成 ,十六进制定义颜色的原理是显示的六位数字每两位是红绿蓝的颜色深度,ff是最大,00是最小,当代表自己的数字最大其他俩个是00的时候就变成了纯粹的红绿蓝。

如果三个都是00,则显示黑色,如果三个都是ff则显示白色。

<font color=rgb(255,255,255)>我是不知道啥颜色的色的耶</font>

我是不知道啥颜色的色的耶

<font color=rgb(173,152,186)>我是不知道啥颜色的色的耶</font>

我是不知道啥颜色的色的耶

~我是不知道啥颜色的色的耶~

rgb分别表示三原色red,green,bule括号的值为(0~255)

纯黑0,0,0,纯白255,255,255

详细请看RGB颜色代码表🎨 (rapidtables.org)

4.字体修改

<font face="华文彩云">我是华文彩云字体</font>

我是华文彩云字体

<font face="微软雅黑">我是微软雅黑字体</font>

我是微软雅黑字体

<strong><font face="楷体">我是楷体字体</font></strong>

我是楷体字体

//<strong></strong>是粗体的意思…楷体有点细…看不清

我是楷体字体

ps:word里面的应该都能转化

5.背景颜色

这里的背景色是:PowderBlue, 十六进制颜色值: #B0E0E6,rgb(176, 224, 230)

这里的背景色是:PowderBlue, 十六进制颜色值: #B0E0E6,rgb(176, 224, 230)

6.图片排版

我插入了一张图片,却发现这张图片排版实在是太大了,有没有办法把他变小呢

<img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0" />"


python markdown语法 字体大小_十六进制

修改后

<img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" border="0" height=80px >


python markdown语法 字体大小_十六进制

height和width分别是长宽,px是像素点单位,可以任意跳整

<img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0"height=250px width=160px>


python markdown语法 字体大小_十六进制

如果不好把握长宽比例,只想放大缩小的话

<img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0" height=50% width=50%>设置height和width为同一百分比就能等比例缩小了


python markdown语法 字体大小_十六进制

图片居中/居左/居右

<!--居中-->
<div align=center><img src=img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0" height=50% width=50%></div>
<!--居右-->
<div align=right><img src=img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0" height=50% width=50%></div>
<!--居左-->
<div align=left><img src=img src="https://s2.51cto.com/images/blog/202410/11010935_67080a4f1c29889186.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=" alt="0z42y.webp" border="0"height=50% width=50%></div>

效果如下




python markdown语法 字体大小_十六进制



python markdown语法 字体大小_十六进制



python markdown语法 字体大小_十六进制


7.表格进阶

之前的字体背景色是利用了html的table属性设置颜色

制作一个多彩的表格

先了解一些知识<table></table>定义一个表格,<th></th>表示表头,<td></td> 表示表格单元 ,<tr></tr>表示表格行

<table>
    <tr bgcolor=rgb(190,10,13)>
   	    <th> name </th><th> age </th>
    </tr>
    <tr>
    	<td>yee</td><td bgcolor=greed>20</td>
    </tr>
    <tr bgcolor=pink>
    	<td >星瞳</td><td>18</td>
    </tr>
    <tr>
    	<td bgcolor=EB1ECF>占乐乐</td><td>17</td>
    </tr>
    
</table>

name

age

yee

20

星瞳

18

占乐乐

17

html中还支持跨行表格

原表格

<table>
    <tr>
        <th >1</th><th>2</th><th>3</th>
    </tr>
    <tr>
    	<td>4</td><td>5</td><td >6</td>
    </tr>
     <tr>
    	<td>7</td><td>8</td><td>9</td>
    </tr>
     <tr>
    	<td>10</td><td>11</td><td>12</td>
    </tr>
     <tr>
    	<td>13</td><td>14</td><td>15</td>
    </tr>
</table>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

<table>
    <tr>
        <th rowspan="3">1</th><th>2</th><th>3</th>
    </tr>
    <tr>
    	<td>4</td><td>5</td><td >6</td>
    </tr>
     <tr>
    	<td>7</td><td>8</td><td>9</td>
    </tr>
     <tr>
    	<td>10</td><td>11</td><td>12</td>
    </tr>
     <tr>
    	<td colspan="2">13</td><td>14</td><td>15</td>
    </tr>
</table>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

可以看到表格往右压缩