为了账号安全,请及时绑定邮箱和手机立即绑定

before和after的问题

div盒子的高度是200px,盒子里面的h1的高度等于200px,插在后面被挤下来我可以理解,为什么用before插在前面会在盒子里面,照道理来说应该在盒子外的上面呀,谁可以解答一下!!!!

http://www.imooc.com/video/5865

这个视频里的

正在回答

4 回答

看不懂;

http://www.narkii.com/eye/ndsques_vq-1755629.html
http://www.narkii.com/eye/ndsques_vq-1755956.html
http://www.narkii.com/eye/ndsques_vq-1755984.html
http://www.narkii.com/eye/ndsques_vq-1756003.html
http://www.narkii.com/eye/ndsques_vq-1756029.html
http://www.narkii.com/eye/ndsques_vq-1756051.html
http://www.narkii.com/eye/ndsques_vq-1756072.html
http://www.narkii.com/eye/ndsques_vq-1756096.html
http://www.narkii.com/eye/ndsques_vq-1756115.html
http://www.narkii.com/eye/ndsques_vq-1756145.html
http://www.narkii.com/eye/ndsques_vq-1756165.html
http://www.narkii.com/eye/ndsques_vq-1756184.html
http://www.narkii.com/eye/ndsques_vq-1756209.html
http://www.narkii.com/eye/ndsques_vq-1756232.html
http://www.narkii.com/eye/ndsques_vq-1756257.html
http://www.narkii.com/eye/ndsques_vq-1756281.html
http://www.narkii.com/eye/ndsques_vq-1756308.html
http://www.narkii.com/eye/ndsques_vq-1756333.html
http://www.narkii.com/eye/ndsques_vq-1756358.html
http://www.narkii.com/eye/ndsques_vq-1756382.html
http://www.narkii.com/eye/ndsques_vq-1756412.html
http://www.narkii.com/eye/ndsques_vq-1756436.html
http://www.narkii.com/eye/ndsques_vq-1756452.html
http://www.narkii.com/eye/ndsques_vq-1756473.html
http://www.narkii.com/eye/ndsques_vq-1756498.html
http://www.narkii.com/eye/ndsques_vq-1756519.html
http://www.narkii.com/eye/ndsques_vq-1756543.html
http://www.narkii.com/eye/ndsques_vq-1756563.html
http://www.narkii.com/eye/ndsques_vq-1756585.html
http://www.narkii.com/eye/ndsques_vq-1756609.html
http://www.narkii.com/eye/ndsques_vq-1756634.html
http://www.narkii.com/eye/ndsques_vq-1756655.html
http://www.narkii.com/eye/ndsques_vq-1756675.html
http://www.narkii.com/eye/ndsques_vq-1756701.html
http://www.narkii.com/eye/ndsques_vq-1756722.html
http://www.narkii.com/eye/ndsques_vq-1756741.html
http://www.narkii.com/eye/ndsques_vq-1756765.html
http://www.narkii.com/eye/ndsques_vq-1756786.html
http://www.narkii.com/eye/ndsques_vq-1756810.html
http://www.narkii.com/eye/ndsques_vq-1756838.html
http://www.narkii.com/eye/ndsques_vq-1756859.html
http://www.narkii.com/eye/ndsques_vq-1756881.html
http://www.narkii.com/eye/ndsques_vq-1756909.html
http://www.narkii.com/eye/ndsques_vq-1756931.html
http://www.narkii.com/eye/ndsques_vq-1756953.html
http://www.narkii.com/eye/ndsques_vq-1756979.html
http://www.narkii.com/eye/ndsques_vq-1757005.html
http://www.narkii.com/eye/ndsques_vq-1757027.html
http://www.narkii.com/eye/ndsques_vq-1757052.html
http://www.narkii.com/eye/ndsques_vq-1757077.html
http://www.narkii.com/eye/ndsques_vq-1757100.html
http://www.narkii.com/eye/ndsques_vq-1757121.html
http://www.narkii.com/eye/ndsques_vq-1757138.html
http://www.narkii.com/eye/ndsques_vq-1757158.html
http://www.narkii.com/eye/ndsques_vq-1757184.html
http://www.narkii.com/eye/ndsques_vq-1757200.html
http://www.narkii.com/eye/ndsques_vq-1757215.html
http://www.narkii.com/eye/ndsques_vq-1757237.html
http://www.narkii.com/eye/ndsques_vq-1757258.html
http://www.narkii.com/eye/ndsques_vq-1757280.html
http://www.narkii.com/eye/ndsques_vq-1757303.html
http://www.narkii.com/eye/ndsques_vq-1757323.html
http://www.narkii.com/eye/ndsques_vq-1757345.html
http://www.narkii.com/eye/ndsques_vq-1757366.html
http://www.narkii.com/eye/ndsques_vq-1757386.html

0 回复 有任何疑惑可以回复我~

伪元素的content 一定会在元素内容前后,试着把<h1>shadow effect</h1>给隐藏掉后,伪元素的content 会挨着一起.如下图.
http://img1.sycdn.imooc.com//5ec237040001e65a07280324.jpg

0 回复 有任何疑惑可以回复我~

before在div里面,h1的外面(前面)。你给div和h1都加上边框border就可以理解了。它是div的子元素,h1的兄弟元素。

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

before和after的问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信