如何控制方向?

来源:2-1 transition-property属性

weibo_纷纷的想念_0

2017-02-17 20:23:45


比如


要将一个块的宽度减少一半
,它是从右向左缩减,如何从左向右缩减呢?

写回答

3回答

嘘_别说话

2017-02-17

可以尝试将元素定位或浮动到右边,那么它就会从左向右缩减啦!

0
heibo_纷纷的想念_0
h 不错 浮动到右边后是从左到右缩减 那么 问题来了 如果在中间 怎么控制方向呢?这个问题也挺无聊的 但是可以探索一下,不过谢谢你的浮动答案 让我脑洞大开啊 你是怎么想到的 我怎么就想不到
h017-02-18
共1条回复

嘘_别说话

2017-02-19

谢谢夸奖呀,一起一起努力哈!

1
heibo_纷纷的想念_0
h <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>task</title> <style type="text/css"> body{ margin:0; padding:0; font-size:30px; font-weight:bold} div{text-align: center; line-height:50px} .one{width:1200px;margin:0 auto;background:blue;height:100px;} .two{width:20%; float:left; background:red; height:600px;} .three{margin-left:20%; background:yellow; height:600px;} .four{background:green; float:right; width:20%; height:600px;} .five{clear:both;background:black;height:50px;} </style> </head> <body> <div class="one" >1</div> <div class="two">2</div> <div class="three">3</div> <div class="four">4</div> <div class="five">5</div> </body> </html> 帅哥 帮我看一下这个代码该怎么弄 我要使234在一行显示。
h017-02-19
共1条回复

嘘_别说话

2017-02-18

我也是写代码调试啊,如果在中间的话,道理是一样的,你可以用一个盒子包裹住你想要设置动画的元素,让该元素在这个盒子中右浮动不就行了么~

1
heibo_纷纷的想念_0
h 太会想了!
h017-02-18
共1条回复

0 学习 · 5760 问题

查看课程

相似问题