Ich mache ein Auswahl-Panel und es fällt mir schwer, einen Aspekt herauszufinden. Es gibt neun Felder, und ich möchte, dass der Benutzer in der Lage ist, auf die Felder zu klicken, und wenn er angeklickt wird, um das Hover-Format beizubehalten, und dann idealerweise eine Art Häkchen oder etwas hinzugefügt am Rand der Box. Ich bin mir völlig unsicher, wie ich den Hover-Font-Effekt der Boxen erhalten kann, wenn ich die Maus aushalte.Halte den Hover-Stil der Elemente aktiv, wenn er angeklickt wird
Weiß jemand, wie ich das tun kann?
#project-scope-container {
\t margin-top: 70px;
\t margin-left: 9%;
\t width: 75%;
\t height: 300px;
}
#project-scope-title {
\t font-size: 1.2em;
\t font-weight: bold;
\t margin-bottom: 15px;
}
.project-option-boxes {
\t display: inline-block;
\t border: 1px solid #45ba95;
\t padding: 20px 0px;
\t margin: 12px 20px 12px 0px;
\t width: 30%;
\t text-align: center;
\t font-size: 1.2em;
\t color: #45ba95;
\t cursor: pointer;
}
.project-option-boxes:hover {
\t background-color: #45ba95;
\t color: #FFF;
}
<div id="project-scope-container">
\t \t <div id="project-scope-title">PROJECT SCOPE</div>
\t \t <div class="project-option-boxes">BRANDING & IDENTITY</div>
\t \t <div class="project-option-boxes">WEB DESIGN</div>
\t \t <div class="project-option-boxes">RESPONSIVE/MOBILE</div>
\t \t <div class="project-option-boxes">MARKETING ASSETS</div>
\t \t <div class="project-option-boxes">HTML5 ANIMATION</div>
\t \t <div class="project-option-boxes">SEO OPTIMIZATION</div>
\t \t <div class="project-option-boxes">MONTHLY SUPPORT</div>
\t \t <div class="project-option-boxes">WEB DEVELOPMENT</div>
\t \t <div class="project-option-boxes">ECOMMERCE</div>
\t </div>
Wie konnte ich ein Bild im Innern der Box hinzufügen, wenn diese Klasse aktiv ist? – Paul
@Paul machen Sie das Bild als Hintergrund und richten Sie es ein. –
Also fügen Sie innerhalb '.box_focused' das Bild als' background-img' hinzu? – Paul