Search
 
SCRIPT & CODE EXAMPLE
 

CSS

fill div on hover

div {
  position: relative;
  display: inline-block;
  padding: 15px 70px;
  border: 5px solid #B17461;
  color: #B17461;
  font-size: 30px;
  font-family: arial;
  background-image: linear-gradient(#B17461, #B17461);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size .5s, color .5s;
}
div:hover {
  background-size: 100% 100%;
  color: #fff;
}
Comment

fill div on hover

div {
  position: relative;
  display: inline-block;
  padding: 15px 70px;
  border: 5px solid #B17461;
  color: #B17461;
  font-size: 30px;
  font-family: arial;
  background-image: linear-gradient(#B17461, #B17461);
  background-repeat: no-repeat;
  transition: background-size .5s, color .5s;
}
.center-right-left, .center-top-bottom, .center-corner {
  background-position: 50% 50%;
}
.to-left {
  background-position: 100% 50%;
}
.to-right {
  background-position: 0% 50%;
}
.to-top {
  background-position: 50% 100%;
}
.to-bottom {
  background-position: 50% 0%;
}
.center-right-left, .to-left, .to-right {
  background-size: 0% 100%;
}
.center-top-bottom, .to-top, .to-bottom {
  background-size: 100% 0%;
}
.center-corner {
  background-size: 0% 0%;
}
div:hover {
  background-size: 100% 100%;
  color: #fff;
}
Comment

fill div on hover

<h4>From center towards left and right</h4>
<div class='center-right-left'>NEXT</div>
<h4>From center towards top and bottom</h4>
<div class='center-top-bottom'>NEXT</div>
<h4>From center towards corners</h4>
<div class='center-corner'>NEXT</div>
<h4>From right to left</h4>
<div class='to-left'>NEXT</div>
<h4>From left to right</h4>
<div class='to-right'>NEXT</div>
<h4>From bottom to top</h4>
<div class='to-top'>NEXT</div>
<h4>From top to bottom</h4>
<div class='to-bottom'>NEXT</div>
Comment

PREVIOUS NEXT
Code Example
Css :: css how to transform and stay on top of page 
Css :: fond de couleur noir et texte en blanc css 
Css :: get diff to branch 
Css :: inline list css without floats 
Css :: use PurifyCSS with hugo 
Css :: function opens a new css section tag 
Css :: li color change css 
Css :: is it possible to add xsl and css in same xml file 
Css :: css borrar 
Css :: what is a css do follow attribute content: "(dofollow)" !important; 
Css :: how do I make secret keys available in gatsby-config from Netlify 
Css :: transform translate css 
Css :: is css easy? 
Css :: alternate table row color css 
Css :: h-screen in tailwind css 
Css :: Spanning Items Across Rows and Columns 
Css :: how to fix the html on tablet movement 
Css :: how to make textbox shorter in html 
Css :: click a list html css 
Css :: webpack how to disable warning when run build 
Css :: css opposite selector 
Css :: css html attribut 
Css :: what is text-justify in css 
Css :: switch css with text 
Css :: activate_bin_path 
Typescript :: ERROR in node_modules/@ng-bootstrap/ng-bootstrap/accordion/accordion.d.ts:230:9 - error TS1086: An accessor cannot be declared in an ambient context. 230 set ngbPanelToggle(panel: NgbPanel); 
Typescript :: check if file exists bash 
Typescript :: convert string to uppercase typescript 
Typescript :: react native children type 
Typescript :: typescript sort array of objects by date descending 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =