我有一个进度条的代码(下面的代码段),我不确定如何进行内联。我已经在剩下的模板中内联了我的CSS其余部分,可以在其中找到进度条,就像在<div>
中包含'style'一样简单。
但是,由于gmail立即从<style>
中删除了<head>
,而且我看不到.done
或.after
之类的任何属性,因此我不确定如何在这里继续。
对于此问题的任何帮助,正确实践的指导或可能对我有进一步教育的资源,我将不胜感激。
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.container {
width: 700px;
margin: 100px auto;
}
.progressbar {
counter-reset: step;
}
.progressbar li {
/*name of incomplete tasks */
list-style-type: none;
width: 20%;
float: left;
font-size: 12px;
font-family: sans-serif;
position: relative;
text-align: center;
color: #7d7d7d;
}
.progressbar li:before {
/*circle of incomplete tasks */
width: 20px;
height: 20px;
content: "";
counter-increment: step;
line-height: 20px;
border: 2px solid #7d7d7d;
display: block;
text-align: center;
margin: 0 auto 5px auto;
border-radius: 50%;
background-color: white;
position: relative; /* ---------------- Added */
z-index: 1; /* ------------------------ Added */
}
.progressbar li:after {
/* line preceding incomplete tasks */
width: 100%;
height: 2px;
content: '';
position: absolute;
background-color: #7d7d7d;
top: 12px;
left: -50%;
}
.progressbar li:first-child:after {
content: none;
}
.progressbar li.done {
/* check mark and name of completed tasks */
color: #55b776;
}
.progressbar li.done:before {
/* circles of completed tasks */
border-color: #55b776;
content: "\2713";
}
.progressbar li.done+li:after {
/* line following completed tasks */
background-color: #55b776;
}
</style>
</head>
<table width="95%" align="center" cellpadding="10" style="width:95%;background-color:white;">
<tbody>
<tr>
<td align="center" style="text-align: center;">
<span class="container">
<ul class="progressbar">
<li class="done">Open</li>
<li class="done">In Progress</li>
<li>With Engineering</li>
<li>Resolution Provided</li>
<li>Closed</li>
</ul>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</html>
答案 0 :(得分:0)
我非常确定gmail不支持伪元素,例如:before和:after。