Flatsome主题- 添加漂亮的联系方式按钮

本页面内容可以快速给你的网站添加联系方式,可用于首页结尾联系,或联系我们页面等,快速添加电话、邮箱、Youtube、Whatsapp链接,前提你必须安装了WordPress Flatsome主题。

Get in touch by selecting an option

Volutpat egestas nibh rhoncus mauris semper.

短代码

[section label="*CTA: Contact Options" bg_color="rgb(248, 246, 244)" padding="46px" padding__md="22px" class="cta-contact-options"]

[gap height="50px"]

[row]

[col span__sm="12"]

[row_inner style="collapse"]

[col_inner span__sm="12" span__md="12" margin="0px 0px 72px 0px" margin__md="0px 0px 48px 0px" align="center"]
<h3 class="heading">Get in touch by selecting an option</h3>
[ux_text font_size="1.25"]
<p class="no-margin">Volutpat egestas nibh rhoncus mauris semper.</p>
[/ux_text]

[/col_inner]
[col_inner span__sm="12"]

[row_inner_1 style="small" v_align="equal"]

[col_inner_1 span="3" span__sm="12" align="center" bg_color="rgb(255,255,255)" bg_radius="8" border="1px 1px 1px 1px" border_radius="8" border_color="rgb(235, 235, 236)" class="card-hover"]

[featured_box img="1064" inline_svg="0" img_width="72" pos="center" icon_border="1" icon_color="rgb(57, 35, 150)" link="tel:+1800123456" class="icon-link first"]

[ux_text text_align="center"]
<h5 class="no-margin"><a href="tel:17588951536">+86 17588951536</a></h5>
[/ux_text]

[/featured_box]

[/col_inner_1]
[col_inner_1 span="3" span__sm="12" align="center" bg_color="rgb(255,255,255)" bg_radius="8" border="1px 1px 1px 1px" border_radius="8" border_color="rgb(235, 235, 236)" class="card-hover"]

[featured_box img="1066" inline_svg="0" img_width="72" pos="center" icon_border="1" icon_color="rgb(3, 136, 255)" link="mailto:hello@yourcompany.com" class="icon-link email"]

[ux_text text_align="center"]
<h5 class="no-margin">hello@yourcompany.com</h5>
[/ux_text]

[/featured_box]

[/col_inner_1]
[col_inner_1 span="3" span__sm="12" align="center" bg_color="rgb(255,255,255)" bg_radius="8" border="1px 1px 1px 1px" border_radius="8" border_color="rgb(235, 235, 236)" class="card-hover"]

[featured_box img="1060" inline_svg="0" img_width="72" pos="center" icon_border="1" icon_color="#ff0000" link="mailto:hello@yourcompany.com" class="icon-link youtube"]

[ux_text text_align="center"]
<h5><a href="https://www.youtube.com/channel/UC0XfCNVLRZ-Qo6FpB2Jkj2w" target="_blank" rel="nofollow noopener">@user-kb3se5gy9r</a></h5>
[/ux_text]

[/featured_box]

[/col_inner_1]
[col_inner_1 span="3" span__sm="12" align="center" bg_color="rgb(255,255,255)" bg_radius="8" border="1px 1px 1px 1px" border_radius="8" border_color="rgb(235, 235, 236)" class="card-hover"]

[featured_box img="1062" inline_svg="0" img_width="72" pos="center" icon_border="1" icon_color="rgb(37, 211, 102)" link="mailto:hello@yourcompany.com" class="icon-link whatsapp"]

[ux_text text_align="center"]
<h5 class="no-margin"><a href="https://web.whatsapp.com/send?l=en&phone=8613430627247" target="_blank" rel="nofollow noopener">Whatsapp</a></h5>
[/ux_text]

[/featured_box]

[/col_inner_1]

[/row_inner_1]

[/col_inner]

[/row_inner]

[/col]

[/row]

[/section]

css


/*---------- CTA: 联系我们页 ----------*/
.cta-contact-options h3.heading {
  font-size: 350%; /* 56px */
  line-height: 1.1;
}
.cta-contact-options .icon-box.icon-link {
  padding: 24px;
}
.cta-contact-options .icon-box.icon-link.first .icon-inner {
  background: #392396; /* First option background color */
}
.cta-contact-options .icon-box.icon-link.youtube .icon-inner {
  background: rgb(255, 0, 0); 
}
.cta-contact-options .icon-box.icon-link.email .icon-inner {
  background: rgb(3, 136, 255); 
}
.cta-contact-options .icon-box.icon-link.whatsapp .icon-inner {
  background: rgb(37, 211, 102); 
}
.cta-contact-options .card-hover .col-inner {
  transition: all 200ms ease;
}
.cta-contact-options .card-hover .col-inner:hover {
  box-shadow: 0 4px 6px 0 rgb(0 0 0 / 10%);
  -webkit-transform: translate(0px, -6px);
  -ms-transform: translate(0px, -6px);
  transform: translate(0px, -6px);
}
@media screen and (max-width:549px) {
  .cta-contact-options h3.heading {
    font-size: 200%; /* 32px */
    line-height: 1.2;
  }
}

可能发生的事

  • 图片图标不显示

是因为你的网站中没有本页的图片ICON,请重新上传图片替换即可正常显示

下载图标

如何使用扁平化模块

在您的 Flatsome 网站上使用扩展组件非常简单。
首先,复制提供的短代码并将其粘贴到文本页面编辑器或直接粘贴到 UX Builder。

1. 复制并粘贴短代码

2.添加自定义CSS代码

其次,复制 CSS 代码(如果提供)并将其粘贴到您的项目中以获得所需的样式。在 WordPress 中添加和更新 CSS 代码的方法有多种,所以让我们逐一了解一下。

WordPress 额外 CSS

外观→自定义→额外 CSS

Css Method 2

Flatsome 自定义 CSS

Flatsome →高级→自定义 CSS

20240513130622

Css Method 3

主题样式.css

外观→主题编辑器→ style.css

20240513130736

Css Method 4

 

Open this in UX Builder to add and edit content