#content { ? ? ? ?width ? ?: 60%; ? ? ? ?height ? : 60%; ? ? ? ?top ? ? ?: 20%; ? ? ? ?left ? ? : 20%; ? ? ? ?overflow : hidden; ? ? ? ?position : absolute; ? ? ? ?border ? : 1px solid #ccc; ? ?} ? ? ? ?.content-wrap { ? ? ? ?position: relative; ? ?} ? ?.content-wrap > li { ? ? ? ?width: 100%; ? ? ? ?height: 100%; ? ? ? ?background: #CAE1FF; ? ? ? ?color: red; ? ? ? ?float: left; ? ? ? ?overflow: hidden; ? ? ? ?position: relative; ? ?} ? ?li:nth-child(2) { ? ? ? background: #9BCD9B; ? ?} ? ? ?li:nth-child(3) { ? ? ? background: yellow; ? ?} ? ? ? ?</style>
為什么此例postion要這樣用?不是應該子絕父相嗎?
Efficiency90
2017-04-03 11:02:03