圣杯布局和双飞翼布局

圣杯布局

html



  
  
  
  Holy Grail Layout
  


    
body {
  min-width: 600px;
}
.container {
  padding-left: 210px;
  padding-right: 190px;
}
.main {
  float: left;
  width: 100%;
  height: 300px;
  background-color: rgba(255, 0, 0, .5);
}
.sub {
  position: relative;
  left: -210px;
  float: left;
  width: 200px;
  height: 300px;
  margin-left: -100%;
  background-color: rgba(0, 255, 0, .5);
}
.extra {
  position: relative;
  right: -190px;
  float: left;
  width: 180px;
  height: 300px;
  margin-left: -180px;
  background-color: rgba(0, 0, 255, 0.5);
}

双飞翼布局

html



  
  
  
  Double Wing Layout
  


  
css
.main-wrapper {
  float: left;
  width: 100%;
}
.main {
  height: 300px;
  margin-left: 210px;
  margin-right: 190px;
  background-color: rgba(255, 0, 0, .5);
}
.sub {
  float: left;
  width: 200px;
  height: 300px;
  margin-left: -100%;
  background-color: rgba(0, 255, 0, .5);
}
.extra {
  float: left;
  width: 180px;
  height: 300px;
  margin-left: -180px;
  background-color: rgba(0, 0, 255, .5);
}

你可能感兴趣的:(圣杯布局和双飞翼布局)