gpt4 book ai didi

html - 我无法获得链接到发送电子邮件的按钮

转载 作者:行者123 更新时间:2023-11-27 23:52:35 25 4
gpt4 key购买 nike

我正在为我们的服务台制作一个与员工见面的页面。即使一切看起来都很好,我真的很难让联系按钮可点击以发送电子邮件。我可以轻松地向电子邮件添加可链接的选项,但看起来很俗气。我感觉它就像四处移动我的标签一样简单,但它似乎对我来说不起作用,无论我把它放在哪里我都不是一个非常有经验的代码编写者。

<style type="text/css">/* Three columns side by side */
.column {
float: left;
width: 33.3%;
margin-bottom: 16px;
padding: 0 8px;
}

/* Display the columns below each other instead of side by side on small screens */
@media screen and (max-width: 650px) {
.column {
width: 100%;
display: block;
}
}

/* Add some shadows to create a card effect */
.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

/* Some left and right padding inside the container */
.container {
padding: 0 16px;
}

/* Clear floats */
.container::after, .row::after {
content: "";
clear: both;
display: table;
}

.title {
color: grey;
}

.button {
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
cursor: pointer;
width: 100%;
}

.button:hover {
background-color: #555;
}
</style>
<div class="row">
<div class="column">
<div class="card"><img alt="Amy" src="img1.jpg" style="width:100%" />
<div class="container">
<h2>Amy</h2>

<p class="title">IT Manager</p>

<p>Some text that describes me lorem ipsum ipsum lorem.</p>

<p><a href="mailto:amyh@.org?subject=%5B%20Spiceworks%20%5D%20-">amyh@.org</a></p>

<p><button class="button">Contact</button></p>
</div>
</div>
</div>

<div class="column">
<div class="card"><img alt="Vincent" src="https://ibb.co/N6VjMjD" style="width:100%" />
<div class="container">
<h2>Vincent</h2>

<p class="title">IT Specialist</p>

<p>Some text that describes me lorem ipsum ipsum lorem.</p>

<p><a href="mailto:vincentw@?subject=%5B%20Spiceworks%20%5D%20%-">vincentw@</a></p>

<p><button class="button">Contact</button></p>
</div>
</div>
</div>
</div>

最佳答案

我建议使用 CSS 为您的 <a> 设置样式像你这样的元素有 <button>元素样式。
像这样:

<a href="mailto..." class="button">Contact</a>

.button {
display: block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
text-decoration:none;
}

这是一个演示:

/* Three columns side by side */

.column {
float: left;
width: 33.3%;
margin-bottom: 16px;
padding: 0 8px;
}


/* Display the columns below each other instead of side by side on small screens */

@media screen and (max-width: 650px) {
.column {
width: 100%;
display: block;
}
}


/* Add some shadows to create a card effect */

.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}


/* Some left and right padding inside the container */

.container {
padding: 0 16px;
}


/* Clear floats */

.container::after,
.row::after {
content: "";
clear: both;
display: table;
}

.title {
color: grey;
}

.button {
display: block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
text-decoration: none;
}

.button:hover {
background-color: #555;
}
<div class="row">

<div class="column">
<div class="card"><img alt="Amy" src="img1.jpg" style="width:100%" />
<div class="container">
<h2>Amy</h2>
<p class="title">IT Manager</p>
<p>Some text that describes me lorem ipsum ipsum lorem.</p>
<p><a href="mailto:amyh@.org?subject=%5B%20Spiceworks%20%5D%20-" class="button">Contact</a></p>
</div>
</div>
</div>

<div class="column">
<div class="card"><img alt="Vincent" src="https://ibb.co/N6VjMjD" style="width:100%" />
<div class="container">
<h2>Vincent</h2>
<p class="title">IT Specialist</p>
<p>Some text that describes me lorem ipsum ipsum lorem.</p>
<p><a href="mailto:vincentw@?subject=%5B%20Spiceworks%20%5D%20%-" class="button">Contact</a></p>
</div>
</div>
</div>

</div>

关于html - 我无法获得链接到发送电子邮件的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56435033/

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