AdSense

網頁

2018/6/29

CSS 置中區塊

CSS 置中區塊。但只有在一開始的畫面置中而已

.center-block{
  width:300px;
  height:300px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin:auto;
  background-color:rgba(255, 6, 6, 0.4);
}
.absolute-position{
  width:300px;
  height:300px;
  position: absolute;
  top: 0;
  left: 0;
  background-color:rgba(6, 6, 255, 0.4);
}

沒有留言:

AdSense