【发布时间】:2018-07-20 18:44:54
【问题描述】:
我有一个进度条的代码(下面的 sn-p),我不确定如何进行内联。我已经为模板的其余部分内联了我的 CSS 的其余部分,该进度条将在其中找到,因为它就像在 <div> 中包含“样式”一样简单。
但是,由于 gmail 会立即从 <head> 中删除 <style>,而且我没有看到像 .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>
【问题讨论】:
标签: html css progress-bar