我正在尝试默认打开一个描述 + 按钮,这样我的客户就不必单击 + 打开按钮来查看描述,我希望它默认打开并能够关闭。这是当前代码,我无法将其操作为默认打开。
/* 简短的介绍 */
#wsite-com-product-short-description {
margin: 30px auto 0;
padding-top: 30px;
border-top: 1px solid #dddddd;
max-height: 20px;
overflow: hidden;
-webkit-transition: max-height .65s ease-in-out;
-moz-transition: max-height .65s ease-in-out;
-o-transition: max-height .65s ease-in-out;
-ms-transition: max-height .65s ease-in-out;
transition: max-height .65s ease-in-out;
}
#wsite-com-product-short-description:before {
content: 'DESCRIPTION +';
display: block;
font-family: "Montserrat";
font-size: .85em;
margin-bottom: 10px;
}
#wsite-com-product-short-description.open {
max-height: 800px;
}
#wsite-com-product-short-description.open:before {
content: 'DESCRIPTION -';
}