left

CSS居中方法总结

水平居中实现方案确定宽度的元素水平居中1.我们可以通过给该元素的父级设置margin: 0 auto的方式来实现。HTML: centerCSS: .parent { margin: auto; } .child { width: 200px; }此时检查元素即可即可实现内层的div实现了居中,这种方式是最为我们

vue.js 简单分页案例(1)

这是一个翻页的简单实例,把案例在本地运行一下,然后去理解每行的意思样式ul,li{ margin: 0px; padding: 0px;}li{ list-style: none}.page-bar li:first-child>a { margin-left: 0px}.page-bar a{ border: 1px solid # ddd;

222. Count Complete Tree Nodes

题目: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is comple

浮动(Floats)原理与清除浮动

浮动概念浮动元素会脱离文档的普通流,根据float的值向左或向右移动,直到它的外边界碰到父元素的内边界或另一个浮动元素的外边界为止。由于浮动框不在文档的普通流中,所以文档的普通流中的块级元素表现得就像浮动元素不存在一样。浮动影响浮动元素会造成父元素塌陷当给元素设置float之后,元素脱离文档流,父元素没有设置height,造成塌陷。.super{ border:1px

11. Container with Most Water

题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (