如何以这样的方式放置WhatsApp号码、邮件和位置,带有图标?

huangapple go评论90阅读模式
英文:

How can I put WhatsApp number, Mail and location like this with icons?

问题

这张图片我从https://icms.edu.pk/上截取的,我想知道如何在我的页面上像这样放置WhatsApp、给我们发邮件和位置信息。有人可以帮我吗?

起初,我以为这些是图片,但它们并不是。

英文:

[my english is not that good, sorry]
This picture I snapped from https://icms.edu.pk/ I want to know how can I put these whatsapp, mail-us and location like in this on my page.
Can someone please help me out?

Firstly, I thought that these are images but they are not.

答案1

得分: 0

他们正在使用一个图标库 - www.flaticon.com

英文:

They are using an icons library - www.flaticon.com

答案2

得分: 0

请检查这个网站 https://fontawesome.com/

一旦您注册(免费),您将获得一个类似于这样的脚本:

<script src="https://kit.fontawesome.com/e1861f2b78.js" crossorigin="anonymous"></script>

将其添加到您的 head 标签中。

然后搜索您需要的图标并获取图标的链接。

您可以使用 CSS 属性自定义它,如果需要进一步的说明,请查看 Font Awesome Howto

英文:

Check this website https://fontawesome.com/

Once you signup (it's free), you will get a script like this:

&lt;script src=&quot;https://kit.fontawesome.com/e1861f2b78.js&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

Add this to your head tag.

Then search for the font you need and get the link for the icon.

You can customize it using CSS properties, check out the Font Awesome Howto if you need clarification.

答案3

得分: 0

使用图标,对于电话号码,请在锚标记内使用 tel:&lt;-- 电话号码 --&gt;,对于电子邮件,请在锚标记内使用 mailto:&lt;-- 邮件地址 --&gt;,或者您可以尝试下面提到的示例:

index.html

&lt;div class=&quot;header-contact&quot;&gt;
  &lt;div id=&quot;phone-details&quot; class=&quot;widget-text&quot;&gt;
    &lt;i class=&quot;fa-brands fa-whatsapp&quot;&gt;&lt;/i&gt;
    &lt;div class=&quot;info-text&quot;&gt;
      &lt;a href=&quot;tel:+92 333-9119145&quot;&gt;
        &lt;span&gt;WhatsApp&lt;/span&gt; +92 333-9119145
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

这是style.css

.header-contact .widget-text {
  position: relative;
  padding-left: 55px;
}
.header-contact .widget-text i {
  position: absolute;
  border-radius: 2px;
  text-align: center;
  left: 0;
  line-height: 40px;
  color: #003e78;
  font-size: 35px;
  -webkit-transition: all .3s ease;
  transition: all .3s ease;
  font-weight: 700;
}
.header-contact .widget-text .info-text a {
  color: #505050;
  font-weight: 400;
  font-size: 16px;
}
a {
  color: #D6F8D6;
  transition: all 0.3s ease 0s;
  text-decoration: none !important;
  outline: none !important;
}
.header-contact .widget-text .info-text span {
  display: block;
  font-weight: 700;
  color: #101010;
  line-height: 18px;
}

还可以在这里使用fontawesome图标

英文:

use icons and for phone number use tel:&lt;-- phone number --&gt; inside the anchor tag and for mail use mailto:&lt;-- mail id --&gt; inside the anchor tag
or you can try the example mentioned below:

index.html

   &lt;div class=&quot;header-contact&quot;&gt;
      &lt;div id=&quot;phone-details&quot; class=&quot;widget-text&quot;&gt;
        &lt;i class=&quot;fa-brands fa-whatsapp&quot;&gt;&lt;/i&gt;
        &lt;div class=&quot;info-text&quot;&gt;
          &lt;a href=&quot;tel:+92 333-9119145&quot;&gt;
            &lt;span&gt;WhatsApp&lt;/span&gt; +92 333-9119145
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;

and here is style.css

.header-contact .widget-text {
  position: relative;
  padding-left: 55px;
}
.header-contact .widget-text i {
  position: absolute;
  border-radius: 2px;
  text-align: center;
  left: 0;
  line-height: 40px;
  color: #003e78;
  font-size: 35px;
  -webkit-transition: all .3s ease;
  transition: all .3s ease;
  font-weight: 700;
}
.header-contact .widget-text .info-text a {
  color: #505050;
  font-weight: 400;
  font-size: 16px;
}
a {
  color: #D6F8D6;
  transition: all 0.3s ease 0s;
  text-decoration: none !important;
  outline: none !important;
}
.header-contact .widget-text .info-text span {
  display: block;
  font-weight: 700;
  color: #101010;
  line-height: 18px;
}

and one more here I can use a fontawesome icons

huangapple
  • 本文由 发表于 2023年2月24日 13:43:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75552998.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定