position

复习CSS3的知识点

我们两清 提交于 2020-02-16 11:06:34
目录 第一篇、用户交互伪类选择器的用法 第二篇、元素状态选择器 第三篇、结构伪类选择器的用法 第四篇、CSS伪元素的用法 第五篇、border-radius画圆 第六篇、画三角形和对话框 第七篇、画菱形和平行四边形 第八篇、画五角星和六角形 第九篇、CSS画五边形和六边形 第十篇、挑战心形和蛋形 第十一篇、太极图的画法 第十二篇、透明背景的实现 第十三篇、CSS的颜色模式 第十四篇、CSS3线性渐变 第十五篇、CSS3的径向渐变 第十六篇、CSS3的重复性渐变 第十七篇、CSS3盒子阴影效果 第十八篇、CSS3制作缓慢边长的方形 第十九篇、CSS3的transition-timing-function详解 第二十篇、制作天猫首页的类别展示效果 第二十一篇、仿天猫类别过渡效果 第二十二篇、CSS3动画中的@keyframes关键帧 第二十三篇、CSS3动画animation复合属性 第二十四篇、利用CSS3制作Loading加载动画 第二十五篇、Loading动画效果实例2 第二十六篇、CSS3制作发光字、立体字、苹果字体 第二十七篇、CSS3用text-overflow解决文字排版问题 第二十八篇、CSS3新的字体单位rem 第一篇、用户交互伪类 选择器 的用法 :hover 鼠标移入 :link 没有交互 :visited 访问过 :active 鼠标按下不放 <a href="

Position:fixed to work on IE 6/7/8 and mozilla

我的梦境 提交于 2020-02-16 07:25:59
问题 I want to make a div's position fixed on the bottom right of a page..( a chat box) ..how do i do that through a css file which will work on all IE6/7/8 and mozilla ....for now i have #chatBox{ position: fixed; bottom: 0%; right: 1%;} This doesn't work on IE..and my constraint is that I am just allowed to edit this CSS file ( so can't set the html to strict mode too). Workarounds I found on the web just talk about position w.r.t to the top of the page not bottom. thanks Mohan 回答1: You can fix

Position:fixed to work on IE 6/7/8 and mozilla

狂风中的少年 提交于 2020-02-16 07:24:13
问题 I want to make a div's position fixed on the bottom right of a page..( a chat box) ..how do i do that through a css file which will work on all IE6/7/8 and mozilla ....for now i have #chatBox{ position: fixed; bottom: 0%; right: 1%;} This doesn't work on IE..and my constraint is that I am just allowed to edit this CSS file ( so can't set the html to strict mode too). Workarounds I found on the web just talk about position w.r.t to the top of the page not bottom. thanks Mohan 回答1: You can fix

position属性值4缺一带你了解相对还是绝对抑或是固定定位

假如想象 提交于 2020-02-15 23:55:04
阿基米德说“给我一个支点,我能翘起整个地球”,在HTML页面中,给你一个坐标,可以把任何一个元素定位目标点,这就是定位!CSS有三种基本的定位机制:相对定位、绝对定位、固定定位,决定定位的position属性的值有static默认标准流,当然这个就不用多说了;fixed固定定位,releative相对定位,absoulte绝对定位, 结论如下:1.定位配合坐标点top bottom left right;2.相对定位相对于自身位置自增或者自减,坐标起点是原来所在位置;3.absolute绝对定位找最近的position属性,没有的话,就找父集进行定位。 代码展示: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <title>position属性值4缺一带你了解相对还是绝对抑或是固定定位</title> 7 <style type="text/css"> 8 div{ 9 width: 200px; 10 height: 200px; 11 color: #fff; 12 } 13 .box1{ 14 width: 120px; 15

NIO--缓冲区(Buffer)

こ雲淡風輕ζ 提交于 2020-02-15 08:36:48
缓冲区(Buffer) Buffer 就像一个数组,可以保存多个相同类型的数据。 根据数据类型不同(boolean 除外) ,有以下 Buffer 常用子类: ByteBuffer CharBuffer ShortBuffer IntBuffer LongBuffer FloatBuffer DoubleBuffer 上述 Buffer 类 他们都采用相似的方法进行管理数据,只是各自 管理的数据类型不同而已。都是通过如下方法获取一个 Buffer 对象: static XxxBuffer allocate(int capacity) : 创建一个容量为 capacity 的 XxxBuffer 对象 缓冲区的基本属性 容量 (capacity) : 表示 Buffer 最大数据容量,缓冲区容量不能为负,并且创 建后不能更改。 限制 (limit): 第一个不应该读取或写入的数据的索引,即位于 limit 后的数据 不可读写。缓冲区的限制不能为负,并且不能大于其容量。 位置 (position): 下一个要读取或写入的数据的索引。缓冲区的位置不能为 负,并且不能大于其限制 标记 (mark)与重置 (reset): 标记是一个索引,通过 Buffer 中的 mark() 方法 指定 Buffer 中一个特定的 position,之后可以通过调用 reset() 方法恢复到这 个

02-CSS基础与进阶-day9_2018-09-12-20-16-28

我怕爱的太早我们不能终老 提交于 2020-02-15 07:52:23
定位 静态定位 position: static 相对定位 position: relative 绝对定位 position: absolute 脱标 参考点 子绝父相 让绝对定位的盒子水平居中和垂直居中 固定定位 position: fixed 参考点 浏览器左上角 固定定位的元素脱标不占有位置 兼容性 ie6低版本不支持固定定位 01复习.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> body { height: 2000px; } .ye { margin: 100px; height: 400px; background-color: yellow; position: relative; } .fa { margin: 100px; height: 300px; background-color: green; /* position: relative; */ } .box { width: 200px; height: 200px; background-color: red; position: absolute; top: 10px; left: 100px; } </style>

图解Android View的scrollTo(),scrollBy(),getScrollX(), getScrollY()

风格不统一 提交于 2020-02-15 07:11:27
图解Android View的scrollTo(),scrollBy(),getScrollX(), getScrollY() - bigconvience的专栏 - 博客频道 - CSDN.NET Android系统手机屏幕的左上角为坐标系,同时y轴方向与笛卡尔坐标系的y轴方向想反。通过提供的api如 getLeft , getTop , getBottom , getRight可以获得控件在parent中的相对位置。同时,也可以获得控件在屏幕中的绝对位置,详细用法可参考 android应用程序中获取view的位置 当我们编写一些自定义的滑动控件时,会用到一些api如scrollTo(),scrollBy(),getScrollX(), getScrollY()。由于常常会对函数getScrollX(), getScrollY()返回的值的含义产生混淆,尤其是正负关系,因此本文将使用几幅图来对这些函数进行讲解以方便大家记忆。 注意:调用View的scrollTo()和scrollBy()是用于滑动View中的内容,而不是把某个View的位置进行改变。如果想改变莫个View在屏幕中的位置,可以使用如下的方法。 调用public void offsetLeftAndRight(int offset)用于左右移动方法或public void offsetTopAndBottom

lintcode33. N皇后问题

折月煮酒 提交于 2020-02-14 23:12:22
n皇后问题是将n个皇后放置在n*n的棋盘上,皇后彼此之间不能相互攻击(任意两个皇后不能位于同一行,同一列,同一斜线)。 给定一个整数n,返回所有不同的n皇后问题的解决方案。 每个解决方案包含一个明确的n皇后放置布局,其中“Q”和“.”分别表示一个女王和一个空位置。 样例 例 1 : 输入 : 1 输出 : [ [ "Q" ] ] 例 2 : 输入 : 4 输出 : [ // Solution 1 [ ".Q.." , "...Q" , "Q..." , "..Q." ] , // Solution 2 [ "..Q." , "Q..." , "...Q" , ".Q.." ] ] 挑战 你能否不使用递归完成? 思路: class Solution { public : /* * @param n: The number of queens * @return: All distinct solutions */ vector < vector < string >> solveNQueens ( int n ) { // write your code here vector < vector < string >> res ; vector < int > position ( n , - 1 ) ; dfs ( res , n , position , 0 ) ; return

blog主题——樱花

北城余情 提交于 2020-02-14 18:19:36
贮存一下,blog代码 QAQ 页脚html <!--live2d--> <script src="https://blog-static.cnblogs.com/files/zouwangblog/autoload.js"></script> <!--live2dend--> <!--放大图片--> <link rel="stylesheet" type="text/css" href="https://blog-static.cnblogs.com/files/zouwangblog/zoom.css"> <script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.2.0/js/transition.js"></script> <script src="https://blog-static.cnblogs.com/files/zouwangblog/zoom.js"></script> <script type='text/javascript'>$('#cnblogs_post_body img').attr('data-action', 'zoom');</script> <!-

详解position:sticky

一世执手 提交于 2020-02-14 11:12:09
今天被人问到position:sticky的使用,由于css这块特效做的不多.深知自己的短板.于是痛定思痛.决定好好积累遇到的css问题 先说一下sticky这个属性的定义 sticky: 元素根据正常文档流进行定位,然后相对它的最近滚动祖先(nearest scrolling ancestor)和 containing block (最近块级祖先 nearest block-level ancestor),包括table-related元素,基于 top , right , bottom , 和 left 的值进行偏移。偏移值不会影响任何其他元素的位置。 MDN是这么解释的.专业性有点强,可能不太好理解.但如果说它的最长的用途,大家都知道,那就是吸顶固定. 就是下面这个效果 该值总是创建一个新的 层叠上下文(stacking context )。注意,一个sticky元素会“固定”在离它最近的一个拥有“滚动机制”的祖先上(当该祖先的 overflow 是 hidden , scroll , auto , 或 overlay 时),即便这个祖先不是真的滚动祖先。这个阻止了所有“sticky”行为(详情见 Github issue on W3C CSSWG )。 简单说,就是在一个滚动的容器里,将一个子元素设置为 postion:sticky 在元素显示在视口中时