پیش‌نمایش زنده
کد HTML
<div class="cardCollection">
  <div class="cardCollectionimg"></div>
  <div class="cardCollectiontextBox">
    <div class="cardCollectiontextContent">
      <p class="cardCollectionh1">Clans of Clash</p>
      <span class="cardCollectionspan"
        ><label class="cardCollectioncheckbox-container">
          <input
            type="checkbox"
            checked=""
            class="cardCollectioncustom-checkbox"
          />
          <span class="cardCollectioncheckmark"></span>
        </label>
      </span>
    </div>
    <p class="cardCollectionp">Price:</p>
    <div></div>
  </div>
</div>
کد CSS
.cardCollection {
  width: 100%;
  max-width: 290px;
  height: 80px;
  background: #353535;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: left;

  transition: 0.5s ease-in-out;
}

.cardCollection:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.cardCollectionimg {
  width: 50px;
  height: 50px;
  margin-left: 10px;
  border-radius: 10px;
  background: linear-gradient(#d7cfcf, #9198e5);
}

.cardCollection:hover > .cardCollectionimg {
  transition: 0.5s ease-in-out;
  background: linear-gradient(#9198e5, #712020);
}

.cardCollectiontextBox {
  width: calc(100% - 90px);
  margin-left: 10px;
  color: white;
  font-family: "Poppins" sans-serif;
}

.cardCollectiontextContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.span {
  font-size: 10px;
}

.cardCollectionh1 {
  font-size: 16px;
  font-weight: bold;
}

.cardCollectionp {
  font-size: 12px;
  font-weight: lighter;
}
.cardCollectioncheckbox-container {
  display: inline-block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.cardCollectioncustom-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.cardCollectioncheckmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 4px;
  transition: background-color 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cardCollectioncheckmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.cardCollectioncustom-checkbox:checked ~ .cardCollectioncheckmark {
  background-color: #2196f3;
  box-shadow: 0 3px 7px rgba(33, 150, 243, 0.3);
}

.cardCollectioncustom-checkbox:checked ~ .cardCollectioncheckmark:after {
  display: block;
}

@keyframes checkAnim {
  0% {
    height: 0;
  }

  100% {
    height: 10px;
  }
}

.cardCollectioncustom-checkbox:checked ~ .cardCollectioncheckmark:after {
  animation: checkAnim 0.2s forwards;
}
نوع: card
تاریخ ایجاد: 2026/06/06
آخرین بروزرسانی: 2026/06/06