CSS background-position

A div takes the upper left corner as the origin, the right direction is the positive direction of X, and the downward direction is the positive direction of Y

To place an image element as a background anywhere in a div, use this property

 

初始:background: url("../img/globalHeaderFontChangeListBg.png") no-repeat;

 

background: url("../img/globalHeaderFontChangeListBg.png") no-repeat 0px 3px;

 

background: url("../img/globalHeaderFontChangeListBg.png") no-repeat 439px 3px;

 


 

 

This property works with the CSS :hover selector to simulate button animations

 1. First set up an area and set the original model

  

2. Split the area with label a (hidden text)

  

3. Each a label area uses the :hover selector to set the hover background and mouse style

  

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325025689&siteId=291194637