Skip to content

Commit

Permalink
Merge pull request markyun#70 from laixintao/master
Browse files Browse the repository at this point in the history
”CSS 让绝对定位的div居中“ 的部分不能作为代码块展示,已修改
  • Loading branch information
markyun authored Sep 26, 2016
2 parents 6bce6f6 + ff68ff3 commit 15a4668
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Front-end-Developer-Questions/Questions-and-Answers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,16 @@ HTML5?
}

* 让绝对定位的div居中

div {
position: absolute;
width: 300px;
height: 300px
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: pink; /* 方便看效果 */
}
Expand Down

0 comments on commit 15a4668

Please sign in to comment.