csdn博客怎么修改字体的大小和颜色

font 英[fɒnt]
同样字体和字号的) 一副铅字,字模,字型;

  Markdown是一种可以使用普通文本编辑器编写的标记语言,通过类似HTML的标记语法,它可以使普通文本内容具有一定的格式。但是它本身是不支持修改字体、字号与颜色等功能的!

  CSDN-markdown编辑器是其衍生版本,扩展了Markdown的功能(如表格、脚注、内嵌HTML等等)!对,就是内嵌HTML,接下来要讲的功能就需要使用内嵌HTML的方法来实现。

字体、字号与颜色

<font face="黑体">我是黑体字</font>
<font face="微软雅黑">我是微软雅黑</font>
<font face="STCAIYUN">我是华文彩云</font>
<font color=#0099ff size=7 face="黑体">color=#0099ff size=72 face="黑体"</font>
<font color=#00ffff size=72>color=#00ffff</font>
<font color=gray size=72>color=gray</font>
 
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Size:规定文本的尺寸大小。可能的值:从 1 到 7 的数字。浏览器默认值是 3。

呈现效果


我是黑体字
我是微软雅黑
我是华文彩云
color=#0099ff size=72 face=”黑体”
color=#00ffff 可以用十六位颜色值
color=gray 也可以用已知颜色名

颜色名列表


颜色名十六进制颜色值颜色
AliceBlue#F0F8FFrgb(240, 248, 255)
AntiqueWhite#FAEBD7rgb(250, 235, 215)
Aqua#00FFFFrgb(0, 255, 255)
Aquamarine#7FFFD4rgb(127, 255, 212)
Azure#F0FFFFrgb(240, 255, 255)
Beige#F5F5DCrgb(245, 245, 220)
Bisque#FFE4C4rgb(255, 228, 196)
Black#000000rgb(0, 0, 0)
BlanchedAlmond#FFEBCDrgb(255, 235, 205)
Blue#0000FFrgb(0, 0, 255)
BlueViolet#8A2BE2rgb(138, 43, 226)
Brown#A52A2Argb(165, 42, 42)
BurlyWood#DEB887rgb(222, 184, 135)
CadetBlue#5F9EA0rgb(95, 158, 160)
Chartreuse#7FFF00rgb(127, 255, 0)
Chocolate#D2691Ergb(210, 105, 30)
Coral#FF7F50rgb(255, 127, 80)
CornflowerBlue#6495EDrgb(100, 149, 237)
Cornsilk#FFF8DCrgb(255, 248, 220)
Crimson#DC143Crgb(220, 20, 60)
Cyan#00FFFFrgb(0, 255, 255)
DarkBlue#00008Brgb(0, 0, 139)
DarkCyan#008B8Brgb(0, 139, 139)
DarkGoldenRod#B8860Brgb(184, 134, 11)
DarkGray#A9A9A9rgb(169, 169, 169)
DarkGreen#006400rgb(0, 100, 0)
DarkKhaki#BDB76Brgb(189, 183, 107)
DarkMagenta#8B008Brgb(139, 0, 139)
DarkOliveGreen#556B2Frgb(85, 107, 47)
Darkorange#FF8C00rgb(255, 140, 0)
DarkOrchid#9932CCrgb(153, 50, 204)
DarkRed#8B0000rgb(139, 0, 0)
DarkSalmon#E9967Argb(233, 150, 122)
DarkSeaGreen#8FBC8Frgb(143, 188, 143)
DarkSlateBlue#483D8Brgb(72, 61, 139)
DarkSlateGray#2F4F4Frgb(47, 79, 79)
DarkTurquoise#00CED1rgb(0, 206, 209)
DarkViolet#9400D3rgb(148, 0, 211)
DeepPink#FF1493rgb(255, 20, 147)
DeepSkyBlue#00BFFFrgb(0, 191, 255)
DimGray#696969rgb(105, 105, 105)
DodgerBlue#1E90FFrgb(30, 144, 255)
Feldspar#D19275rgb(209, 146, 117)
FireBrick#B22222rgb(178, 34, 34)
FloralWhite#FFFAF0rgb(255, 250, 240)
ForestGreen#228B22rgb(34, 139, 34)
Fuchsia#FF00FFrgb(255, 0, 255)
Gainsboro#DCDCDCrgb(220, 220, 220)
GhostWhite#F8F8FFrgb(248, 248, 255)
Gold#FFD700rgb(255, 215, 0)
GoldenRod#DAA520rgb(218, 165, 32)
Gray#808080rgb(128, 128, 128)
Green#008000rgb(0, 128, 0)
GreenYellow#ADFF2Frgb(173, 255, 47)
HoneyDew#F0FFF0rgb(240, 255, 240)
HotPink#FF69B4rgb(255, 105, 180)
IndianRed#CD5C5Crgb(205, 92, 92)
Indigo#4B0082rgb(75, 0, 130)
Ivory#FFFFF0rgb(255, 255, 240)
Khaki#F0E68Crgb(240, 230, 140)
Lavender#E6E6FArgb(230, 230, 250)
LavenderBlush#FFF0F5rgb(255, 240, 245)
LawnGreen#7CFC00rgb(124, 252, 0)
LemonChiffon#FFFACDrgb(255, 250, 205)
LightBlue#ADD8E6rgb(173, 216, 230)
LightCoral#F08080rgb(240, 128, 128)
LightCyan#E0FFFFrgb(224, 255, 255)
LightGoldenRodYellow#FAFAD2rgb(250, 250, 210)
LightGrey#D3D3D3rgb(211, 211, 211)
LightGreen#90EE90rgb(144, 238, 144)
LightPink#FFB6C1rgb(255, 182, 193)
LightSalmon#FFA07Argb(255, 160, 122)
LightSeaGreen#20B2AArgb(32, 178, 170)
LightSkyBlue#87CEFArgb(135, 206, 250)
LightSlateBlue#8470FFrgb(132, 112, 255)
LightSlateGray#778899rgb(119, 136, 153)
LightSteelBlue#B0C4DErgb(176, 196, 222)
LightYellow#FFFFE0rgb(255, 255, 224)
Lime#00FF00rgb(0, 255, 0)
LimeGreen#32CD32rgb(50, 205, 50)
Linen#FAF0E6rgb(250, 240, 230)
Magenta#FF00FFrgb(255, 0, 255)
Maroon#800000rgb(128, 0, 0)
MediumAquaMarine#66CDAArgb(102, 205, 170)
MediumBlue#0000CDrgb(0, 0, 205)
MediumOrchid#BA55D3rgb(186, 85, 211)
MediumPurple#9370D8rgb(147, 112, 216)
MediumSeaGreen#3CB371rgb(60, 179, 113)
MediumSlateBlue#7B68EErgb(123, 104, 238)
MediumSpringGreen#00FA9Argb(0, 250, 154)
MediumTurquoise#48D1CCrgb(72, 209, 204)
MediumVioletRed#C71585rgb(199, 21, 133)
MidnightBlue#191970rgb(25, 25, 112)
MintCream#F5FFFArgb(245, 255, 250)
MistyRose#FFE4E1rgb(255, 228, 225)
Moccasin#FFE4B5rgb(255, 228, 181)
NavajoWhite#FFDEADrgb(255, 222, 173)
Navy#000080rgb(0, 0, 128)
OldLace#FDF5E6rgb(253, 245, 230)
Olive#808000rgb(128, 128, 0)
OliveDrab#6B8E23rgb(107, 142, 35)
Orange#FFA500rgb(255, 165, 0)
OrangeRed#FF4500rgb(255, 69, 0)
Orchid#DA70D6rgb(218, 112, 214)
PaleGoldenRod#EEE8AArgb(238, 232, 170)
PaleGreen#98FB98rgb(152, 251, 152)
PaleTurquoise#AFEEEErgb(175, 238, 238)
PaleVioletRed#D87093rgb(216, 112, 147)
PapayaWhip#FFEFD5rgb(255, 239, 213)
PeachPuff#FFDAB9rgb(255, 218, 185)
Peru#CD853Frgb(205, 133, 63)
Pink#FFC0CBrgb(255, 192, 203)
Plum#DDA0DDrgb(221, 160, 221)
PowderBlue#B0E0E6rgb(176, 224, 230)
Purple#800080rgb(128, 0, 128)
Red#FF0000rgb(255, 0, 0)
RosyBrown#BC8F8Frgb(188, 143, 143)
RoyalBlue#4169E1rgb(65, 105, 225)
SaddleBrown#8B4513rgb(139, 69, 19)
Salmon#FA8072rgb(250, 128, 114)
SandyBrown#F4A460rgb(244, 164, 96)
SeaGreen#2E8B57rgb(46, 139, 87)
SeaShell#FFF5EErgb(255, 245, 238)
Sienna#A0522Drgb(160, 82, 45)
Silver#C0C0C0rgb(192, 192, 192)
SkyBlue#87CEEBrgb(135, 206, 235)
SlateBlue#6A5ACDrgb(106, 90, 205)
SlateGray#708090rgb(112, 128, 144)
Snow#FFFAFArgb(255, 250, 250)
SpringGreen#00FF7Frgb(0, 255, 127)
SteelBlue#4682B4rgb(70, 130, 180)
Tan#D2B48Crgb(210, 180, 140)
Teal#008080rgb(0, 128, 128)
Thistle#D8BFD8rgb(216, 191, 216)
Tomato#FF6347rgb(255, 99, 71)
Turquoise#40E0D0rgb(64, 224, 208)
Violet#EE82EErgb(238, 130, 238)
VioletRed#D02090rgb(208, 32, 144)
Wheat#F5DEB3rgb(245, 222, 179)
White#FFFFFFrgb(255, 255, 255)
WhiteSmoke#F5F5F5rgb(245, 245, 245)
Yellow#FFFF00rgb(255, 255, 0)
YellowGreen#9ACD32rgb(154, 205, 50)
        <span class="MathJax_Preview cye-lm-tag" style="color: inherit; display: none;"></span><span class="MathJax cye-lm-tag" id="MathJax-Element-1-Frame" tabindex="0" style="position: relative;" data-mathml="<math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;><merror><mtext>(function&amp;#xA0;()&amp;#xA0;{</mtext></merror></math>" role="presentation"><span class="math cye-lm-tag" id="MathJax-Span-1" style="" aria-hidden="true"><span class="noError cye-lm-tag" id="MathJax-Span-2" style="display: inline-block;">(function&nbsp;()&nbsp;{</span></span><span class="MJX_Assistive_MathML cye-lm-tag" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><merror><mtext>(function&nbsp;()&nbsp;{</mtext></merror></math></span></span><script type="math/tex" id="MathJax-Element-1">(function () {
            </script>('pre.prettyprint code').each(function () {
                var lines = <span class="MathJax_Preview cye-lm-tag" style="color: inherit; display: none;"></span><span class="MathJax cye-lm-tag" id="MathJax-Element-2-Frame" tabindex="0" style="position: relative;" data-mathml="<math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;><mo stretchy=&quot;false&quot;>(</mo><mi>t</mi><mi>h</mi><mi>i</mi><mi>s</mi><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>t</mi><mi>e</mi><mi>x</mi><mi>t</mi><mo stretchy=&quot;false&quot;>(</mo><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>s</mi><mi>p</mi><mi>l</mi><mi>i</mi><mi>t</mi><msup><mo stretchy=&quot;false&quot;>(</mo><mo>&amp;#x2032;</mo></msup><msup><mtext mathcolor=&quot;red&quot;>\n</mtext><mo>&amp;#x2032;</mo></msup><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>l</mi><mi>e</mi><mi>n</mi><mi>g</mi><mi>t</mi><mi>h</mi><mo>;</mo><mi>v</mi><mi>a</mi><mi>r</mi></math>" role="presentation"><nobr aria-hidden="true"><span class="math cye-lm-tag" id="MathJax-Span-3" style="width: 19.26em; display: inline-block;"><span style="display: inline-block; position: relative; width: 15.374em; height: 0px; font-size: 125%;" class="cye-lm-tag"><span style="position: absolute; clip: rect(1.26em, 1015.37em, 2.689em, -999.997em); top: -2.283em; left: 0em;" class="cye-lm-tag"><span class="mrow cye-lm-tag" id="MathJax-Span-4"><span class="mo cye-lm-tag" id="MathJax-Span-5" style="font-family: MathJax_Main;">(</span><span class="mi cye-lm-tag" id="MathJax-Span-6" style="font-family: MathJax_Math-italic;">t</span><span class="mi cye-lm-tag" id="MathJax-Span-7" style="font-family: MathJax_Math-italic;">h</span><span class="mi cye-lm-tag" id="MathJax-Span-8" style="font-family: MathJax_Math-italic;">i</span><span class="mi cye-lm-tag" id="MathJax-Span-9" style="font-family: MathJax_Math-italic;">s</span><span class="mo cye-lm-tag" id="MathJax-Span-10" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-11" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-12" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">t</span><span class="mi cye-lm-tag" id="MathJax-Span-13" style="font-family: MathJax_Math-italic;">e</span><span class="mi cye-lm-tag" id="MathJax-Span-14" style="font-family: MathJax_Math-italic;">x</span><span class="mi cye-lm-tag" id="MathJax-Span-15" style="font-family: MathJax_Math-italic;">t</span><span class="mo cye-lm-tag" id="MathJax-Span-16" style="font-family: MathJax_Main;">(</span><span class="mo cye-lm-tag" id="MathJax-Span-17" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-18" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-19" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">s</span><span class="mi cye-lm-tag" id="MathJax-Span-20" style="font-family: MathJax_Math-italic;">p</span><span class="mi cye-lm-tag" id="MathJax-Span-21" style="font-family: MathJax_Math-italic;">l</span><span class="mi cye-lm-tag" id="MathJax-Span-22" style="font-family: MathJax_Math-italic;">i</span><span class="mi cye-lm-tag" id="MathJax-Span-23" style="font-family: MathJax_Math-italic;">t</span><span class="msup cye-lm-tag" id="MathJax-Span-24"><span style="display: inline-block; position: relative; width: 0.689em; height: 0px;" class="cye-lm-tag"><span style="position: absolute; clip: rect(3.089em, 1000.35em, 4.403em, -999.997em); top: -3.997em; left: 0em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-25" style="font-family: MathJax_Main;">(</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span><span style="position: absolute; top: -4.34em; left: 0.403em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-26" style="font-size: 70.7%; font-family: MathJax_Main;">′</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span></span></span><span class="msup cye-lm-tag" id="MathJax-Span-27"><span style="display: inline-block; position: relative; width: 1.317em; height: 0px;" class="cye-lm-tag"><span style="position: absolute; clip: rect(3.089em, 1001.03em, 4.403em, -999.997em); top: -3.997em; left: 0em;" class="cye-lm-tag"><span class="mtext cye-lm-tag" id="MathJax-Span-28" style="font-family: MathJax_Main; color: red;">\n</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span><span style="position: absolute; top: -4.454em; left: 1.031em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-29" style="font-size: 70.7%; font-family: MathJax_Main;">′</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span></span></span><span class="mo cye-lm-tag" id="MathJax-Span-30" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-31" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-32" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">l</span><span class="mi cye-lm-tag" id="MathJax-Span-33" style="font-family: MathJax_Math-italic;">e</span><span class="mi cye-lm-tag" id="MathJax-Span-34" style="font-family: MathJax_Math-italic;">n</span><span class="mi cye-lm-tag" id="MathJax-Span-35" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;" class="cye-lm-tag"></span></span><span class="mi cye-lm-tag" id="MathJax-Span-36" style="font-family: MathJax_Math-italic;">t</span><span class="mi cye-lm-tag" id="MathJax-Span-37" style="font-family: MathJax_Math-italic;">h</span><span class="mo cye-lm-tag" id="MathJax-Span-38" style="font-family: MathJax_Main;">;</span><span class="mi cye-lm-tag" id="MathJax-Span-39" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">v</span><span class="mi cye-lm-tag" id="MathJax-Span-40" style="font-family: MathJax_Math-italic;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-41" style="font-family: MathJax_Math-italic;">r</span></span><span style="display: inline-block; width: 0px; height: 2.289em;" class="cye-lm-tag"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -0.354em; border-left: 0px solid; width: 0px; height: 1.575em;" class="cye-lm-tag"></span></span></nobr><span class="MJX_Assistive_MathML cye-lm-tag" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo stretchy="false">(</mo><mi>t</mi><mi>h</mi><mi>i</mi><mi>s</mi><mo stretchy="false">)</mo><mo>.</mo><mi>t</mi><mi>e</mi><mi>x</mi><mi>t</mi><mo stretchy="false">(</mo><mo stretchy="false">)</mo><mo>.</mo><mi>s</mi><mi>p</mi><mi>l</mi><mi>i</mi><mi>t</mi><msup><mo stretchy="false">(</mo><mo>′</mo></msup><msup><mtext mathcolor="red">\n</mtext><mo>′</mo></msup><mo stretchy="false">)</mo><mo>.</mo><mi>l</mi><mi>e</mi><mi>n</mi><mi>g</mi><mi>t</mi><mi>h</mi><mo>;</mo><mi>v</mi><mi>a</mi><mi>r</mi></math></span></span><script type="math/tex" id="MathJax-Element-2">(this).text().split('\n').length;
                var </script>numbering = $('<ul></ul>').addClass('pre-numbering').hide();
                <span class="MathJax_Preview cye-lm-tag" style="color: inherit; display: none;"></span><span class="MathJax cye-lm-tag" id="MathJax-Element-3-Frame" tabindex="0" style="position: relative;" data-mathml="<math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;><mo stretchy=&quot;false&quot;>(</mo><mi>t</mi><mi>h</mi><mi>i</mi><mi>s</mi><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>a</mi><mi>d</mi><mi>d</mi><mi>C</mi><mi>l</mi><mi>a</mi><mi>s</mi><mi>s</mi><msup><mo stretchy=&quot;false&quot;>(</mo><mo>&amp;#x2032;</mo></msup><mi>h</mi><mi>a</mi><mi>s</mi><mo>&amp;#x2212;</mo><mi>n</mi><mi>u</mi><mi>m</mi><mi>b</mi><mi>e</mi><mi>r</mi><mi>i</mi><mi>n</mi><msup><mi>g</mi><mo>&amp;#x2032;</mo></msup><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>p</mi><mi>a</mi><mi>r</mi><mi>e</mi><mi>n</mi><mi>t</mi><mo stretchy=&quot;false&quot;>(</mo><mo stretchy=&quot;false&quot;>)</mo><mo>.</mo><mi>a</mi><mi>p</mi><mi>p</mi><mi>e</mi><mi>n</mi><mi>d</mi><mo stretchy=&quot;false&quot;>(</mo></math>" role="presentation"><nobr aria-hidden="true"><span class="math cye-lm-tag" id="MathJax-Span-42" style="width: 30.174em; display: inline-block;"><span style="display: inline-block; position: relative; width: 24.117em; height: 0px; font-size: 125%;" class="cye-lm-tag"><span style="position: absolute; clip: rect(1.374em, 1024.06em, 2.689em, -999.997em); top: -2.283em; left: 0em;" class="cye-lm-tag"><span class="mrow cye-lm-tag" id="MathJax-Span-43"><span class="mo cye-lm-tag" id="MathJax-Span-44" style="font-family: MathJax_Main;">(</span><span class="mi cye-lm-tag" id="MathJax-Span-45" style="font-family: MathJax_Math-italic;">t</span><span class="mi cye-lm-tag" id="MathJax-Span-46" style="font-family: MathJax_Math-italic;">h</span><span class="mi cye-lm-tag" id="MathJax-Span-47" style="font-family: MathJax_Math-italic;">i</span><span class="mi cye-lm-tag" id="MathJax-Span-48" style="font-family: MathJax_Math-italic;">s</span><span class="mo cye-lm-tag" id="MathJax-Span-49" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-50" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-51" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-52" style="font-family: MathJax_Math-italic;">d<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;" class="cye-lm-tag"></span></span><span class="mi cye-lm-tag" id="MathJax-Span-53" style="font-family: MathJax_Math-italic;">d<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;" class="cye-lm-tag"></span></span><span class="mi cye-lm-tag" id="MathJax-Span-54" style="font-family: MathJax_Math-italic;">C<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.06em;" class="cye-lm-tag"></span></span><span class="mi cye-lm-tag" id="MathJax-Span-55" style="font-family: MathJax_Math-italic;">l</span><span class="mi cye-lm-tag" id="MathJax-Span-56" style="font-family: MathJax_Math-italic;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-57" style="font-family: MathJax_Math-italic;">s</span><span class="mi cye-lm-tag" id="MathJax-Span-58" style="font-family: MathJax_Math-italic;">s</span><span class="msup cye-lm-tag" id="MathJax-Span-59"><span style="display: inline-block; position: relative; width: 0.689em; height: 0px;" class="cye-lm-tag"><span style="position: absolute; clip: rect(3.089em, 1000.35em, 4.403em, -999.997em); top: -3.997em; left: 0em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-60" style="font-family: MathJax_Main;">(</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span><span style="position: absolute; top: -4.34em; left: 0.403em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-61" style="font-size: 70.7%; font-family: MathJax_Main;">′</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span></span></span><span class="mi cye-lm-tag" id="MathJax-Span-62" style="font-family: MathJax_Math-italic;">h</span><span class="mi cye-lm-tag" id="MathJax-Span-63" style="font-family: MathJax_Math-italic;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-64" style="font-family: MathJax_Math-italic;">s</span><span class="mo cye-lm-tag" id="MathJax-Span-65" style="font-family: MathJax_Main; padding-left: 0.231em;">−</span><span class="mi cye-lm-tag" id="MathJax-Span-66" style="font-family: MathJax_Math-italic; padding-left: 0.231em;">n</span><span class="mi cye-lm-tag" id="MathJax-Span-67" style="font-family: MathJax_Math-italic;">u</span><span class="mi cye-lm-tag" id="MathJax-Span-68" style="font-family: MathJax_Math-italic;">m</span><span class="mi cye-lm-tag" id="MathJax-Span-69" style="font-family: MathJax_Math-italic;">b</span><span class="mi cye-lm-tag" id="MathJax-Span-70" style="font-family: MathJax_Math-italic;">e</span><span class="mi cye-lm-tag" id="MathJax-Span-71" style="font-family: MathJax_Math-italic;">r</span><span class="mi cye-lm-tag" id="MathJax-Span-72" style="font-family: MathJax_Math-italic;">i</span><span class="mi cye-lm-tag" id="MathJax-Span-73" style="font-family: MathJax_Math-italic;">n</span><span class="msup cye-lm-tag" id="MathJax-Span-74"><span style="display: inline-block; position: relative; width: 0.803em; height: 0px;" class="cye-lm-tag"><span style="position: absolute; clip: rect(3.374em, 1000.46em, 4.403em, -999.997em); top: -3.997em; left: 0em;" class="cye-lm-tag"><span class="mi cye-lm-tag" id="MathJax-Span-75" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;" class="cye-lm-tag"></span></span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span><span style="position: absolute; top: -4.34em; left: 0.517em;" class="cye-lm-tag"><span class="mo cye-lm-tag" id="MathJax-Span-76" style="font-size: 70.7%; font-family: MathJax_Main;">′</span><span style="display: inline-block; width: 0px; height: 4.003em;" class="cye-lm-tag"></span></span></span></span><span class="mo cye-lm-tag" id="MathJax-Span-77" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-78" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-79" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">p</span><span class="mi cye-lm-tag" id="MathJax-Span-80" style="font-family: MathJax_Math-italic;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-81" style="font-family: MathJax_Math-italic;">r</span><span class="mi cye-lm-tag" id="MathJax-Span-82" style="font-family: MathJax_Math-italic;">e</span><span class="mi cye-lm-tag" id="MathJax-Span-83" style="font-family: MathJax_Math-italic;">n</span><span class="mi cye-lm-tag" id="MathJax-Span-84" style="font-family: MathJax_Math-italic;">t</span><span class="mo cye-lm-tag" id="MathJax-Span-85" style="font-family: MathJax_Main;">(</span><span class="mo cye-lm-tag" id="MathJax-Span-86" style="font-family: MathJax_Main;">)</span><span class="mo cye-lm-tag" id="MathJax-Span-87" style="font-family: MathJax_Main;">.</span><span class="mi cye-lm-tag" id="MathJax-Span-88" style="font-family: MathJax_Math-italic; padding-left: 0.174em;">a</span><span class="mi cye-lm-tag" id="MathJax-Span-89" style="font-family: MathJax_Math-italic;">p</span><span class="mi cye-lm-tag" id="MathJax-Span-90" style="font-family: MathJax_Math-italic;">p</span><span class="mi cye-lm-tag" id="MathJax-Span-91" style="font-family: MathJax_Math-italic;">e</span><span class="mi cye-lm-tag" id="MathJax-Span-92" style="font-family: MathJax_Math-italic;">n</span><span class="mi cye-lm-tag" id="MathJax-Span-93" style="font-family: MathJax_Math-italic;">d<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;" class="cye-lm-tag"></span></span><span class="mo cye-lm-tag" id="MathJax-Span-94" style="font-family: MathJax_Main;">(</span></span><span style="display: inline-block; width: 0px; height: 2.289em;" class="cye-lm-tag"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -0.354em; border-left: 0px solid; width: 0px; height: 1.432em;" class="cye-lm-tag"></span></span></nobr><span class="MJX_Assistive_MathML cye-lm-tag" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mo stretchy="false">(</mo><mi>t</mi><mi>h</mi><mi>i</mi><mi>s</mi><mo stretchy="false">)</mo><mo>.</mo><mi>a</mi><mi>d</mi><mi>d</mi><mi>C</mi><mi>l</mi><mi>a</mi><mi>s</mi><mi>s</mi><msup><mo stretchy="false">(</mo><mo>′</mo></msup><mi>h</mi><mi>a</mi><mi>s</mi><mo>−</mo><mi>n</mi><mi>u</mi><mi>m</mi><mi>b</mi><mi>e</mi><mi>r</mi><mi>i</mi><mi>n</mi><msup><mi>g</mi><mo>′</mo></msup><mo stretchy="false">)</mo><mo>.</mo><mi>p</mi><mi>a</mi><mi>r</mi><mi>e</mi><mi>n</mi><mi>t</mi><mo stretchy="false">(</mo><mo stretchy="false">)</mo><mo>.</mo><mi>a</mi><mi>p</mi><mi>p</mi><mi>e</mi><mi>n</mi><mi>d</mi><mo stretchy="false">(</mo></math></span></span><script type="math/tex" id="MathJax-Element-3">(this).addClass('has-numbering').parent().append(</script>numbering);
                for (i = 1; i </div>                                    </div>
            <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-095d4a0b23.css" rel="stylesheet">
                </div>
在EasyExcel中,设置第一行字体大小和背景颜色可以通过以下步骤实现: 1. 首先,创建一个自定义的样式类CustomCellWriteHandler,用来设置单元格的样式。在这个类中,可以使用setFillForegroundColor方法设置单元格的背景颜色,使用setFont方法设置字体大小。具体代码可以参考引用中的示例。 2. 在生成Excel单元格后,使用registerWriteHandler方法注册自定义的样式类CustomCellWriteHandler,即可对单元格的样式进行操作。具体代码如下: ```java EasyExcel.write(response.getOutputStream(), LifeGetStockHistoryResDTO.class) .inMemory(true) .registerWriteHandler(new CustomCellWriteHandler()) // 自定义样式 .sheet().doWrite(export); ``` 通过以上步骤,你可以在EasyExcel中设置第一行字体大小和背景颜色。具体的字体大小和背景颜色可以在CustomCellWriteHandler类中进行设置,根据你的需求选择合适的方法进行设置,可以使用IndexedColors中定义的颜色,也可以自定义RGB颜色。具体的设置方法可以参考引用中的示例。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [EasyExcel 设置字体样式(字体字体大小字体颜色字体加粗、字体斜体、字体下划线、字体上标下标、字体...](https://blog.csdn.net/qq_38974638/article/details/117388442)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [EasyExcel导出数据根据导出值大小,设置字体颜色](https://blog.csdn.net/qq_44978342/article/details/127650164)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值