Html 如何增加链接的大小?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10087847/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 23:41:53  来源:igfitidea点击:

How to increase the size of a link?

htmlhyperlinkfonts

提问by Arun Kumar

Hi i need to display my link in footer as "powered by Arun" and it should be a link to my homepage. I need to give a different look to the name next to Powered by. So how to increase the size of the link and any suggestions for customizing the link well.

嗨,我需要在页脚中显示我的链接为“由 Arun 提供支持”,它应该是指向我主页的链接。我需要给Powered by旁边的名称一个不同的外观。那么如何增加链接的大小以及自定义链接的任何建议。

回答by Grant Thomas

Use a <span>element:

使用<span>元素:

<span>Powered By</span> Arun

You can then apply a style to the span, or a class:

然后,您可以将样式应用于跨度或类:

  • Inline style:

    <span style="font-size:1.2em;"></span>
    
  • Class style:

    apply the class:

    <span class="mySpanClass"></span>
    

    and specify corresponding style (in a stylesheet):

    .mySpanClass { font-size:1.2em; }
    
  • 内联样式:

    <span style="font-size:1.2em;"></span>
    
  • 课堂风格:

    应用类:

    <span class="mySpanClass"></span>
    

    并指定相应的样式(在样式表中):

    .mySpanClass { font-size:1.2em; }
    

回答by Jashwant

I think, you need something like this,

我想,你需要这样的东西,

<a href='linkToHomePage' style='font-size:1.2em'>Powered by<span style="font-weight:bold">Arun</span></a>

(I am guessing your are not a technical person, so this will be easy for you)

(我猜你不是技术人员,所以这对你来说很容易)

And if you can do, please do this,

如果你能做到,请这样做,

Add this css,

添加这个css,

.poweredby {
  font-size:1.2em;
}
.author {
  font-weight:bold;
}

And add this markup,

并添加此标记,

<a href='linkToHomePage' class='poweredby'>Powered by<span class="author">Arun</span></a>

回答by brian waltse

If you want to give some basic style to a link couldn't you do

如果你想给一个链接一些基本的风格,你不能吗

<p><a href="https://iden.example.org"><i style="font-size:1.5em ;color: blue; ">Powered by</i><strong> Arun</strong></a></p>

回答by AYK

As denoted by Mr. Disappointment in his answer you can use a <span>.

正如失望先生在他的回答中所指出的,您可以使用<span>.

To show an example of using it with the link, see below.

要显示通过链接使用它的示例,请参见下文。

<a href="LinkToYouHomePage.htm"><span style="font-size: small">Powered by</span> <span
    style="font-size: larger">Arun</span> </a>