@import url(http://fonts.lug.ustc.edu.cn/css?family=Roboto+Condensed:300); h1{ font-family: 'Roboto Condensed', sans-serif; text-align: center; } .cf:before, .cf:after { content: " "; /* 1 */ display: table; /* 2 */ } .cf:after { clear: both; } /** * For IE 6/7 only * Include this rule to trigger hasLayout and contain floats. */ .cf { *zoom: 1; } .boxes{ display: block; width: 30%; height: 220px; background: #fe4; position: relative; overflow: hidden; float: left; margin: 1.5%; cursor: pointer; } .da-image{ min-height: 100%; width: 100%; } .overlay{ display: block; position: absolute; width: 100%; height: 100%; top: 0%; left: -100%; color: #FFF; background-color: rgba(0,0,0,0.8); z-index: 10; } .container{ width: 1170px; display: block; margin: auto; }