【发布时间】:2019-12-01 08:08:26
【问题描述】:
如何将 + 号移到左侧?
* {
margin: 0;
padding: 0;
}
.content {
justify-content: center;
align-items: center;
height: 100vh;
}
details {
font-family: 'Raleway', sans-serif;
}
summary {
transition: background .75s ease;
width: 960px;
outline: 0;
text-lign: center;
font-size: 85%;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
border-bottom: 1px solid black;
}
h50 {
color: rgb(0, 0, 255);
text-align: left;
margin-bottom: 0;
padding: 15px;
text-shadow: none;
font-size: small;
font-weight: bold;
}
details p {
padding: 0 25px 15px 25px;
margin: 0;
text-shadow: none;
text-align: justify;
line-height: 1.3em;
}
summary::after {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: '\02795';
/* Unicode character for "plus" sign (+) */
font-size: 13px;
color: #777;
float: right;
margin-left: 5px;
display: inline-block;
padding-right: 15px;
font-size: 90%;
color: rgb(0, 0, 255);
}
details[open] summary::after {
content: "\2796";
/* Unicode character for "minus" sign (-) */
display: inline-block;
padding-right: 15px;
font-size: 90%;
}
details[open] summary:hover {
background: none;
}
summary:hover {
background: #d3d3d3;
}
details summary::-webkit-details-marker {
display: none;
}
【问题讨论】:
-
你能添加你的html吗?也许使用 sn-p 工具?
-
不要转储所有的 css,只添加需要的,同时添加你的 html 代码。
-
我什至看不出你有什么问题,你想把+号移到什么的左边?如果它只是在其当前位置的稍微左侧,只需在
summary::after中调整您的padding-right
标签: javascript html css