Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- Start Departments -->
<section class="departments section">
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <div class="section-title text-center">
          <h2>Our Specialities</h2>
          <img src="https://getcustomcms.com/demo/apollo/img/section-img.png" alt="#">
        </div>
        <br>
      </div>
    </div>
    <div class="row">
      <div class="col-12">
        <div class="why-choose-cards">
          <!-- Card #1 -->
          <div class="card Oncology">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Oncology
              </h3>
              <p>Cancer Care</p>
            </div>
          </div>
          <!-- Card #2 -->
          <div class="card Cardiology">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Cardiology
              </h3>
              <p>Heart Care</p>
            </div>
          </div>
          <!-- Card #3 -->
          <div class="card Spine">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Spine Surgery
              </h3>
              <p>Spine Health</p>
            </div>
          </div>
          <div class="card Orthopedic">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Orthopedic
              </h3>
              <p>Bone and Joint</p>
            </div>
          </div>
          <div class="card Organ">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Organ Transplants
              </h3>
              <p>Transplant Services</p>
            </div>
          </div>
          <div class="card Gastroenterology">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Gastroenterology
              </h3>
              <p>Digestive Health</p>
            </div>
          </div>
          <div class="card Gynecology">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Gynecology
              </h3>
              <p>Gynecology</p>
            </div>
          </div>
          <div class="card Hematology">
            <div class="card-content">
              <h3 class="card-title">
                <span class="accent-line"></span>Hematology
              </h3>
              <p>Blood and Blood Disorders</p>
            </div>
          </div>

        </div>
      </div>
    </div>
  </section>
  <!-- End Departments -->
              
            
!

CSS

              
                /* 3) Card Container Layout */
.why-choose-cards {
  display: flex;
  flex-wrap: wrap; /* allows the cards to wrap on smaller screens */
  gap: 1.5rem;
  justify-content: center; /* center the cards in the container */
}
/* 4) Individual Cards */
/* Card styles (same as before, with a little extra at the end) */
.card {
  background-color: #f9f9f9;
  flex: 1 1 260px;
  max-width: 320px;
  padding: 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease; /* smooth transition for hover effects */
}
/* New hover state */
.card:hover {
  background-color: #fff; /* lighten background on hover */
  transform: translateY(-5px); /* subtle “lift” effect */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* a more pronounced shadow */
}
/* 5) Card Number Style */
.card-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #0e1c3f;
  margin-bottom: 1.5rem;
}
/* 6) Card Text Content */
.card-content {
  /* The h3 and paragraph go here. */
}
.card-title {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: #0e1c3f;
  margin-bottom: 0.75rem;
}
.card-title .accent-line {
  display: inline-block;
  width: 3px;
  height: 1.2em; /* match the approximate line-height of the text */
  background-color: #1D77D1; /* gold accent */
  margin-right: 0.5rem;
}
/* The accent line’s default state */
.accent-line {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: #d1b575; /* your gold color */
  margin-right: 0.5rem;
  /* Enable smooth animation of the transform */
  transition: transform 0.3s ease;
  /* Ensure the line expands from the bottom or center; adjust as you prefer */
  transform-origin: bottom;
}
/* On card hover, scale the accent-line vertically */
.card:hover .accent-line {
  transform: scaleY(
    1.5
    ); /* grows 50% taller; try 2.0 or more for a bigger effect */
  }
  .card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
  }
  /* Responsive tweaks (optional) */
  @media (max-width: 768px) {
    .card {
      max-width: 100%;
    }
  }
  .section {
    padding: 50px 0;
  }
  .Oncology:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Oncology.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Cardiology:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Cardiology.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Spine:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Spine.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Orthopedic:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Orthopedic.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Organ:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Organ.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Gastroenterology:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Gastroenterology.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Gynecology:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Gynecology.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Hematology:hover {
    background-image: url(https://getcustomcms.com/demo/apollo/upload/icons/Hematology.png);
    background-repeat: no-repeat;
    background-position: right -27px;
  }
  .Oncology,
  .Cardiology,
  .Spine,
  .Orthopedic,
  .Organ,
  .Gastroenterology,
  .Gynecology,
  .Hematology{
    position:relative
  }
  .Oncology:hover .card-content::after,
  .Cardiology:hover .card-content::after,
  .Spine:hover .card-content::after,
  .Orthopedic:hover .card-content::after,
  .Organ:hover .card-content::after,
  .Gastroenterology:hover .card-content::after,
  .Gynecology:hover .card-content::after,
  .Hematology:hover .card-content::after{
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    background-color: #0000007a;
  }
  .Oncology:hover h3, .Oncology:hover p,
  .Cardiology:hover h3, .Cardiology:hover p,
  .Spine:hover h3, .Spine:hover p,
  .Orthopedic:hover h3, .Orthopedic:hover p,
  .Organ:hover h3, .Organ:hover p,
  .Gastroenterology:hover h3, .Gastroenterology:hover p,
  .Gynecology:hover h3, .Gynecology:hover p,
  .Hematology:hover h3, .Hematology:hover p {
    color: #ffffff !important;
    position: relative;
    z-index: 1;
  }
              
            
!

JS

              
                
              
            
!
999px

Console