设为首页 加入收藏

TOP

CSS学习摘要-定位实例(四)
2019-09-03 03:22:42 】 浏览:73
Tags:CSS 学习 摘要 -定位 实例
t of the checkbox hack — the checked state */ input[type=checkbox]:checked + aside { right: 0px; } </style> </head> <body> <label for="toggle">?</label> <input type="checkbox" id="toggle"> <aside> <h2>Information</h2> <p>Some very important information about your app:</p> <ol> <li>It has a really cool slide-out information box.</li> <li>This information box uses a combination of fixed positioning and a CSS transition for the smooth sliding.</li> <li>It also uses a cool technique called the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>.</li> <li>This allows you to create a nice "toggle on/toggle off" UI effect without using any java script, which will work in IE9 and above (the smooth transition will work in IE10 and above.)</li> </ol> </aside> </body> </html>

gif效果图:

总结

这样完成了我们对定位的关注——现在,你应该理解基本机制的工作原理,同样理解了怎样应用这些知识去构建一些有趣的用户界面功能,不要由于你还未完全理解所有的知识而担心——定位是一个相当高级的话题,你可以随时读这篇文章来帮助你的理解。下一个主题我们将转向Flexbox。

【end】

首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Flex入坑指南 下一篇css左固定右自适应常用方法

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目