gpt4 book ai didi

javascript - 我如何重写此联系按钮代码以使其正常工作?

转载 作者:太空宇宙 更新时间:2023-11-03 21:22:55 25 4
gpt4 key购买 nike

我的网站上有一个带有以下编码的联系按钮,但它没有按要求打开电子邮件页面。我想知道是否有人能够帮助我重写代码以使其正常工作。

我希望保留现有的样式和 ID。基本上我无法让它悲伤地工作。

#contact-button{
border: none;
color: white;
padding-top: 7px;
padding-right: 33px;
padding-left: 28px;
padding-bottom: 8px;
text-align: center;
text-decoration: none;
display: inline-block;
font-style: lato;
font-size: 20px;
margin-top: 4px;
margin-right: 2px;
margin-left: 245px;
margin-bottom: 4px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
cursor: pointer;
opacity: 0.90;
border-radius: 3px;
}

#contact-button {
background-color: #F06000;
color: white;
}

#contact-button:hover {
color: white;
background-color: #A74200;
}

#mail-icon{
margin-top: 6px;
float: left;
margin-right: 6px;
}
<a href="mailto:#" id="contact-button">Message Me
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA3ElEQVQ4T6WTaw3CQBCEZxzgAHCAhEpAQnGAlKIAcIADQAFIQAIOhsxmr2lKQ0q7fy697Hw3+ygxMzhTD0qqAGgqyACLXwDOf0JqAEsDbgkQyd0YiKRT5q0CQLKStAfgcmqS7yGQpAWAI4A7ySa0BWCBJNsKUB+S4iuAA8lw8AXIyw2AxiCSz86dRXYXd2MAtmtHDotdVgsdBHRLSOElz22ebngzWEI20fb9SjQx60bv2+U9SB7aHuQYnVgs/5xmjtH7sy6L5MYUu2NWwTl+LPbAs58c83+myU+n8AOSyY9qfRA3mgAAAABJRU5ErkJggg==" alt="Mail Icon" id="mail-icon" />
</a>

最佳答案

只需删除 mailto 之前的空格:

邮箱:joebloggs@gmail.com

应该是

mailto:joebloggs@gmail.com


片段

#contact-button{
border: none;
color: white;
padding-top: 7px;
padding-right: 33px;
padding-left: 28px;
padding-bottom: 8px;
text-align: center;
text-decoration: none;
display: inline-block;
font-style: lato;
font-size: 20px;
margin-top: 4px;
margin-right: 2px;
margin-left: 245px;
margin-bottom: 4px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
cursor: pointer;
opacity: 0.90;
border-radius: 3px;
}

#contact-button {
background-color: #F06000;
color: white;
}

#contact-button:hover {
color: white;
background-color: #A74200;
}

#mail-icon{
margin-top: 6px;
float: left;
margin-right: 6px;
}
<a href="mailto:joebloggs@gmail.com" id="contact-button">Message Me
</a>

关于javascript - 我如何重写此联系按钮代码以使其正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35777321/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com