This method can even solve the problem that the IMG content is centered
Routines: The outermost div width is the width of the center content (usually 1170px), and it is centered (Margin:auto)
The div width in the inner layer is full screen (usually 1920px;) margin-left:-368px the value equals (1170-1920)/2 = 375px, but the actual combat time will also be biased. So it doesn't have to be a death rule.
The principle is not clear at the moment. Here's how:
Html:
<Divclass= "My-slider-li-imgdiv"> <Divclass= "My-slider-li-imgdiv-inner"> <imgsrc= "Http://images.weicantimes.com/banner-1.jpg"alt= "More intelligent food and beverage information Management system, customer return, efficient promotion, easy management, intelligent operation" /> </Div></Div>
Css:
. My-slider-li-imgdiv { width:1170px; margin: auto; } . My-slider-li-imgdiv-inner { width:1920px; margin-left: -368px; }
I know the new CSS + HTML super-cool center strategy