<!DOCTYPE html><html>?? ?<head>?? ??? ?<meta charset="utf-8">?? ??? ?<title></title>?? ??? ?<style>?? ??? ??? ?.box{?? ??? ??? ??? ?width: 200px;?? ??? ??? ??? ?height: 200px;?? ??? ??? ??? ?border: 1px solid black;?? ??? ??? ???? position: relative;?? ??? ??? ?}?? ??? ??? ?.box span{?? ??? ??? ??? ?width: 50px;?? ??? ??? ??? ?height: 50px;?? ??? ??? ??? ?background-color: yellow;?? ??? ??? ??? ?position: absolute;?? ??? ??? ??? ?right: -10px;?? ??? ??? ??? ?top: -10px;?? ??? ??? ?}?? ??? ?</style>?? ?</head>?? ?<body>?? ??? ?<div class="box">?? ??? ??? ?<div class="item"></div>?? ??? ???? <span></span>?? ??? ??? ??? ?</div>?? ?</body></html>
span元素寬高設(shè)置問題,為何父級設(shè)置相對定位,span設(shè)置絕對定位后寬高生效了?
浮世繪3145722
2016-06-16 18:16:56