position

CSS3之transform属性-3D转换

ε祈祈猫儿з 提交于 2019-12-21 07:10:21
三维坐标系 x 轴:水平向右 – 注意:x轴右边是正值,左边是负值 y 轴:垂直向下 – 注意:y轴下面是正值,上面是负值 z 轴:垂直屏幕 – 注意:z轴往外是正值,往里是负值 3D旋转左手准则 左手 的手 拇指 指向旋转轴的 正方向 其余手指 的 弯曲方向 就是该元素沿着该旋转轴旋转的 方向 (正值方向) transform: 作用: 该属性可以将元素旋转、缩放、移动、倾斜等 说明: 应用于元素的 2D 或 3D 转换 常用值: (none) :定义不进行转换 (translate) :定义2d位移,向右、向下为正值;向左、向上为负值 (translate3d) :定义3d位移 (translateX) :定义关于x轴的位移 (translateY) :定义关于y轴的位移 (translateZ) :定义关于z轴的位移 (rotate) :定义2d旋转,顺时针为正值;逆时针为负值 (rotate3d) :定义3d旋转 (rotateX) :定义关于x轴的旋转 (rotateY) :定义关于y轴的旋转 (rotateZ) :定义关于z轴的旋转 (scale) :定义2d缩放,0 - 1缩小,1 - +∞放大 (scale3d) :定义3d缩放 (scaleX) :定义关于x轴的缩放 (scaleY) :定义关于y轴的缩放 (scaleZ) :定义关于z轴的缩放 transform

认识CSS中css背景样式设置

拜拜、爱过 提交于 2019-12-21 05:18:31
前端之HTML,CSS(五)   CSS   CSS背景   CSS可以添加背景颜色和背景图片,也可以对图片进行设置。设置的样式有: background-color 背景颜色 background-image 背景图片 background-repeat 是否平铺 background-position 背景位置 background-attachment 背景是固定还是滚动    background-color: 设置背景颜色,属性值:颜色设置三种方式:red、#f00、rgb(255,0,0)。 注意CSS3中使用rgba(R,G,B,A),其中A代表透明度,属性值取值范围为0-1,0为透明,1为不透明。 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>背景颜色-测试</title> 6 <style type="text/css"> 7 body { 8 background-color: red; 9 } 10 </style> 11 </head> 12 <body> 13 <p>背景颜色</p> 14 </body> 15 </html> View Code    backgound-image: 设置背景图片,属性值:URL()添加图片路径,路径设置:绝对路径,相对路径

Relative Layout: Different behavior on Api < 11

耗尽温柔 提交于 2019-12-21 05:05:51
问题 I don't know why, but layout is shown well on device with Api 11+, isn't for older. This is xml: <LinearLayout android:id="@+id/workers_linearlayout" android:layout_width="50dp" android:layout_height="70dp" android:layout_weight="1" > <RelativeLayout android:id="@+id/workers_relative_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap

IE 6 vs. position:fixed

核能气质少年 提交于 2019-12-21 04:33:09
问题 position:fixed that doesn't work for Internet explorer 6. I can't really understand the fixes found on google. I need it to work in IE6, IE7, IE8 & FireFox 3.0. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <title>Sidebar fixed</title> <style type="text/css"> #wrapper {

Problem with position absolute in ie7, div moves 10px to the right

余生颓废 提交于 2019-12-21 04:22:07
问题 ive got a problem on my position absolute property on IE7. My div moves 10px to the right. Below is my code. IE8 and 9 works fine. id menu is the div Im referring. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body{margin: 0 0 0 0; padding: 0 0 0 0;} #holder{width: 400px;

Find screen position of a QGraphicsItem

感情迁移 提交于 2019-12-21 03:45:12
问题 Use case: This should be a fairly common problem. In a normal QMainWindow with QMdiArea lives an mdiChild with a QGraphicsView. This view displays a QGraphicsScene with QGraphicsItems inside. A right-click at one of these items selects (focusses) the item and opens a context menu, which is conveniently placed at the screen coordinates QGraphicsSceneMouseEvent::screenPos() . This is working as expected. Now I'd like to show the same context menu when the user presses a key (e.g. Qt::Key_Menu).

Android 自定义View之能力分析图

感情迁移 提交于 2019-12-21 03:00:57
MainActivity //能力分析图 AbilityAnalysisView abilityView = ( AbilityAnalysisView ) findViewById ( R . id . abilityAnalysisView_id ) analysisView . setDataCount ( 5 ) . setTitles ( new String [ ] { "伤害" , "防御" , "攻速" , "吸血" , "助攻" } ) . setDatas ( new float [ ] { 170 , 120 , 90 , 210 , 120 } ) //TODO 赋值相应的各维度分值,数据最大值maxValue在自定义View里可以更改 . setColors ( new int [ ] { R . color . colorOrange4 , R . color . colorOrange3 , R . color . colorOrange2 , R . color . colorOrange1 , R . color . colorOrange5 } ) . invalidate ( ) ; //TODO 坑更新自定义View 调用OnDraw方法 activity_main.xml < ? xml version = "1.0" encoding =

CSS属性(float、position)

巧了我就是萌 提交于 2019-12-20 23:53:50
一、float属性 1、基本属性 先来了解一下block元素和inline元素在文档流中的排列方式。   block元素通常被现实为独立的一块,独占一行,多个block元素会各自新起一行,默认block元素宽度自动填满其父元素宽度。block元素可以设置width、height、margin、padding属性;   inline元素不会独占一行,多个相邻的行内元素会排列在同一行里,直到一行排列不下,才会新换一行,其宽度随元素的内容而变化。inline元素设置width、height属性无效 常见的块级元素有 div、form、table、p、pre、h1~h5、dl、ol、ul 等 。 常见的内联元素有span、a、strong、em、label、input、select、textarea、img、br等。 所谓的文档流 ,指的是元素排版布局过程中,元素会自动从左往右,从上往下的流式排列。 脱离文档流 ,也就是将元素从普通的布局排版中拿走,其他盒子在定位的时候, 会当做脱离文档流的元素不存在而进行定位 。 假如某个div元素A是浮动的,如果A元素上一个元素也是浮动的,那么A元素会跟随在上一个元素的后边(如果一行放不下这两个元素,那么A元素会被挤到下一行);如果A元素上一个元素是标准流中的元素,那么A的相对垂直位置不会改变,也就是说A的顶部总是和上一个元素的底部对齐。此外

nio系列(一)---nio重要组成

丶灬走出姿态 提交于 2019-12-20 21:10:43
nio重要组成部分 前言:通过本文可以了解nio的重要组成部分,了解完基础的内容后后面理解才会简单一点。下一篇会讲讲nio的应用和io的对比。如果有不正确的地方还望指正。 channel chanel接口的实现类 FileChannel 从文件中读取数据 DatagramChannel 通过udp读取网络中数据 SocketChannel 通过tcp读取网络中的数据 SeverSocketChannel 可以监听新进来的TCP连接,每一个新进来的连接都会创建一个SocketChanel 通道的注意点 通道可以是单向也可是双向的,同时实现ReadableByteChannel和WritableByteChannel接口可以实现双向运输 RandomAccessFile aFile = new RandomAccessFile("C:\\Users\\jiajun\\Desktop\\Test.txt", "rw"); FileChannel inChannel = aFile.getChannel(); ByteBuffer buf=ByteBuffer.allocate(20); inChannel.read(buf); buf.flip(); inChannel.write(buf); inChannel.close(); //文件中本来有3个6,执行操作后有6个6

解决IE6不支持position:fixed问题

≯℡__Kan透↙ 提交于 2019-12-20 21:00:11
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 很少的时候,界面上需要一个固定位置的块,不论页面怎么滚动,始终停在它的位置,比如“返回顶部”、“给建议”、“分享按钮”、“广告”等等。css中有position: fixed;可以直接用,很方便,但是万恶的IE6却不支持,下面讲两种方法解决这个问题。 方法一: *html {/* 只有IE6支持 */ background-image: url(about:blank); /* 使用空背景 */ background-attachment: fixed; /* 固定背景 */ } #box { /* 非IE6浏览器使用固定元素 */ position: fixed; top: 0; left: 0; /* IE6改为绝对定位,并通过css表达式根据滚动位置更改top的值 */ _position: absolute; _top: expression(eval(document.documentElement.scrollTop)); } 这个方法要注意的是,*html使用固定位置空背景目的是解决滚动的时候抖动的问题,原理是这样,滚动页面浏览器重新计算出网页,然后执行css,所以固定元素产生延迟的抖动,使用固定背景之后,在滚动的时候先执行了css,再重新计算网页,所以没有抖动问题了。 document