如何更改选取框文本的大小?

问题描述

如何更改选取框文本的大小?
请帮忙。我现在使用的选框代码是这样的:

<marquee behavior="scroll" direction="left" scrollamount="30">Sidebar Test</marquee>

解决方法

只需添加 CSS

marquee {
  font-size: xx-large;
}
<marquee behavior="scroll" direction="left" scrollamount="30">Sidebar Test</marquee>

,

marquee{
font-size:50px;
}
<marquee behavior="scroll" direction="left" scrollamount="30">Sidebar Test</marquee>

,

经典 Html,style="font-size:50pt;"

   <marquee style="font-size:50pt;" behavior="scroll" direction="left" scrollamount="30">Sidebar Test</marquee>

,

选取框的格式在这里:https://way2tutorial.com/html/html_marquee_tag.php

解决您关于字体大小的具体问题,试试这个:

考虑选取框在不同浏览器上的工作方式 - 例如,我注意到 Chrome 渲染选取框比 safari 更好 - Safari 往往有点紧张(水平)[我使用的是 MacOS Big Sur 11.04]

,

有很多方法,就是这两种

  1. marquee{properties} 中添加 style.css 例如-

    marquee{
        font-size:3em;
        width:10em;
        height:2em;
        color:white;
        background-color:black;
    }
<marquee attribute_name = "attribute_value"....more attributes>
    One or more lines or text message or image
 </marquee>

  1. 使用内联 CSS。例如-

<marquee style="color:green;font-size:2em;" attribute_name = "attribute_value"....more attributes>
    One or more lines or text message or image
 </marquee>