0

here what i am trying is i am displaying the 3 bootstrap cards here what i am trying to achieve is on hover of card the card has to be zooming or pop out with out using j query / java script. Like the image below i am trying to achieve by using the css i can achieve but how to implement in bootstrap

below is mycard code i used css

<div>
                <article class="plan">
                    <h1>FREE</h1>
                    <h2>$0/month</h2>
                    <h3>For hobby projects or small teams.</h3>
                    <ul class="plan__features">
                        <li>1 Workspace</li>
                        <li>Unlimited Traffic</li>
                        <li>10GB Storage</li>
                        <li>Basic Support</li>
                    </ul>
                    <div>
                        <button>CHOOSE PLAN</button>
                    </div>
                </article>
                <article class="plan plan--highlighted">
                    <h1 class="plan__annotation">RECOMMENDED</h1>
                    <h1>PLUS</h1>
                    <h2>$29/month</h2>
                    <h3>For ambitious projects.</h3>
                    <ul class="plan__features">
                        <li>5 Workspaces</li>
                        <li>Unlimited Traffic</li>
                        <li>100GB Storage</li>
                        <li>Plus Support</li>
                    </ul>
                    <div>
                        <button>CHOOSE PLAN</button>
                    </div>
                </article>
                <article class="plan">
                    <h1>PREMIUM</h1>
                    <h2>$99/month</h2>
                    <h3>Your enterprise solution.</h3>
                    <ul class="plan__features">
                        <li>10 Workspaces</li>
                        <li>Unlimited Traffic</li>
                        <li>Unlimited Storage</li>
                        <li>Priority Support</li>
                    </ul>
                    <div>
                        <button>CHOOSE PLAN</button>
                    </div>
                </article>
            </div>
Devpop
  • 37
  • 1
  • 10
  • Possible duplicate of [Fluent Design card lift effect](https://stackoverflow.com/questions/51184792/fluent-design-card-lift-effect) – caiovisk Jul 09 '18 at 02:41

3 Answers3

3

Are you looking for this solution??

h1 { font-size: 170% !important; }
h2 { font-size: 150% !important; }
h3 { font-size: 130% !important; }
h4 { font-size: 110% !important; }

article.plan { 
 margin: 20px; 
 border: #ddd solid 1px; 
 background: #f4f4f4; 
 font-size: 14px;
 padding: 10px;
    transition: all 0.5s;
    -webkit-transition: all 0.5s; /* Safari 3.1 to 6.0 */
}

article.plan:hover { 
 margin: 12px; 
 font-size: 15px;
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
  <div class="col-4">
    <article class="plan">
      <h1>FREE</h1>
      <h2>$0/month</h2>
      <h3>For hobby projects or small teams.</h3>
      <ul class="plan__features">
        <li>1 Workspace</li>
        <li>Unlimited Traffic</li>
        <li>10GB Storage</li>
        <li>Basic Support</li>
      </ul>
      <div>
        <button>CHOOSE PLAN</button>
      </div>
    </article>
  </div>
  <div class="col-4">
    <article class="plan plan--highlighted">
      <h1 class="plan__annotation">RECOMMENDED</h1>
      <h1>PLUS</h1>
      <h2>$29/month</h2>
      <h3>For ambitious projects.</h3>
      <ul class="plan__features">
        <li>5 Workspaces</li>
        <li>Unlimited Traffic</li>
        <li>100GB Storage</li>
        <li>Plus Support</li>
      </ul>
      <div>
        <button>CHOOSE PLAN</button>
      </div>
    </article>
  </div>
  <div class="col-4">
    <article class="plan">
      <h1>PREMIUM</h1>
      <h2>$99/month</h2>
      <h3>Your enterprise solution.</h3>
      <ul class="plan__features">
        <li>10 Workspaces</li>
        <li>Unlimited Traffic</li>
        <li>Unlimited Storage</li>
        <li>Priority Support</li>
      </ul>
      <div>
        <button>CHOOSE PLAN</button>
      </div>
    </article>
  </div>
</div>
Eugine Joseph
  • 1,552
  • 3
  • 18
  • 40
2

hi the best and simplest way to achieve this is just add this to your css code.

.plan:hover{transform:scale(1.1); background:green; color:#fff;} or .plan:hover h1,h2,h2{color:#fff;}

or you can use the scale property according to your requirement you can even add transition-duration to you .plan class as well.

Sumit Kumar
  • 493
  • 2
  • 5
  • 16
0

you can make this as a reference :)

.plan{
background-color:#c9f78c;
padding-top:10px;
padding-bottom:10px;
}
.plan__features{
list-style-type:none;
}
.plan:hover{
background-color:green;
}
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Card</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
<div class="row">
  <div class="col-md-4 text-center">
    <article class="plan">
        <h1>FREE</h1>
        <h2>$0/month</h2>
        <h3>For hobby projects or small teams.</h3>
        <ul class="plan__features">
            <li>1 Workspace</li>
            <li>Unlimited Traffic</li>
            <li>10GB Storage</li>
            <li>Basic Support</li>
        </ul>
        <div>
            <button>CHOOSE PLAN</button>
        </div>
    </article>
  </div>
  <div class="col-md-4 text-center">
  <article class="plan plan--highlighted">
        <h1 class="plan__annotation">RECOMMENDED</h1>
        <h1>PLUS</h1>
        <h2>$29/month</h2>
        <h3>For ambitious projects.</h3>
        <ul class="plan__features">
            <li>5 Workspaces</li>
            <li>Unlimited Traffic</li>
            <li>100GB Storage</li>
            <li>Plus Support</li>
        </ul>
        <div>
            <button>CHOOSE PLAN</button>
        </div>
    </article>
  </div>
  <div class="col-md-4 text-center">
  <article class="plan">
        <h1>PREMIUM</h1>
        <h2>$99/month</h2>
        <h3>Your enterprise solution.</h3>
        <ul class="plan__features">
            <li>10 Workspaces</li>
            <li>Unlimited Traffic</li>
            <li>Unlimited Storage</li>
            <li>Priority Support</li>
        </ul>
        <div>
            <button>CHOOSE PLAN</button>
        </div>
    </article>
  </div>

</div>

</div>
 

</body>
</html>
Joji
  • 356
  • 2
  • 16