position

Positioning label on CPTBarPlot (Core-Plot)

六月ゝ 毕业季﹏ 提交于 2019-12-05 12:11:29
I am trying to change default position of labels in Bar chart with Core-Plot. I am using this method: -(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)idx; And I return: return textLayer = [[CPTTextLayer alloc] initWithText:@"2222" style:textStyle]; I get this result: But I want to appear as follows: Any idea? I tried to find answer on documentation, but I has been impossible. Use a negative labelOffset for the bar plot. The default is +10 which puts the labels 10 pixels above the bars. This property is inherited from CPTPlot so it works for all plot types, although the

change custom product tab position in admin grid Magento

馋奶兔 提交于 2019-12-05 11:58:24
Hi i have added a new product tab in admin grid by following the below link http://inchoo.net/magento/how-to-add-custom-product-relations-in-magento/ Everything is working fine. BUt this has added the new tab at the last position in product edit section. Can you please suggest me how can i change the position of that tab. thanks You can use the action addTabAfter instead of addTab , then you have to specify the <after> parameter (categories, websites, upsell...). I edited the code of your tutorial for example: <reference name="product_tabs"> <action method="addTabAfter"> <name>custom</name>

【H5】 经纬度位置获取navigator.geolocation.getCurrentPosition

拈花ヽ惹草 提交于 2019-12-05 11:33:13
navigator.geolocation.getCurrentPosition(function(){ }) 经度 : coords.longitude 纬度 : coords.latitude 准确度 : coords.accuracy 海拔 : coords.altitude 海拔准确度 : coords.altitudeAcuracy 行进方向 : coords.heading 地面速度 : coords.speed 请求的时间: new Date(position.timestamp) 获取方法代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> * { margin: 0; padding: 0;} #box { width: 500px; height: 500px; border: 2px solid deeppink; } </style> </head> <body>

[CSS]CSS Position 详解

时间秒杀一切 提交于 2019-12-05 11:04:25
一. CSS position 属性介绍 CSS中position属性指定一个元素(静态的,相对的,绝对或固定)的定位方法的类型。有static,relative,absolute和fixed四种取值,默认是static。 二. position: static static:没有定位,元素出现在正常的文档流中,忽略left,right,top,bottom和z-index。 所以对元素position属性设定static时,left属性不起作用,但是元素出现在正常的流中。 三. position: fixed fixed:生成固定定位的元素,相对于浏览器窗口定位,即浏览器窗口滚动也不会影响元素位置,元素的位置与文档流无关,因此不占据空间,可能会和其他元素发生重叠。 窗口滚动不会影响content元素位置,content元素一直在contaniner元素的右下角。 四. position: relative reletive:元素相对其自己正常位置定位,元素在正常的文档流中。 没有设置left和top时的正常位置。 设置了left和top属性,元素位置移动,向右移动50px,向下移动20px。但是元素预留的空间保持正常流动,也就是不会对其他元素产生影响。 五. position: absolute absolute:元素绝对定位,相对于static定位以外的第一个父元素

[CSS]CSS中使用span和div遇到的问题

点点圈 提交于 2019-12-05 10:55:45
一. span和div的区别 1.span是行级元素,div是块级元素 2.span占用的宽度是内容的宽度,而div默认是一行。 所以一般在页面中,只有一行或不到一行文字用span,元素占据多行时用div。 二. 问题 下图是希望得到的效果 div在两个span的下方,但是如果这么写, div和span的位置重叠,因为对span元素设置了float属性,从而导致浮动塌陷,解决办法是将span元素的高度计算进去,但是因为span元素是行级元素,无法设置高度,所以需要其他解决办法。 三. 解决办法 1. 设置div高度 这样就可以了。 2. 设置div属性display 将div设置为display: inline-block,使其既具有block元素的特性,可以设置宽度和高度,同时也具有inline元素的不换行的特性。 但是这是对第二个span元素设置的float: right属性不生效,因为display: inline-block会使元素按行依次排列,所以第二个span元素的float: right不生效,要想达到想要的效果,可以通过设置margin-left来实现。 3. 设置div属性overflow 将div设置为overflow: hidden,使其形成BFC,可以使div高度自动计算,从而和下面的div不会发生重叠。 4. 设置content属性position

Emlog增加弹出搜索功能教程

落爺英雄遲暮 提交于 2019-12-05 10:55:10
教程简介 今天回到家 没事整理下网站 发下了自己的博客搜索太丑了 所以二话不说借助了很多有名的博客 终于看上了一款弹出搜索样式不错的搜索 也就是饺子的模板EMlog Fly模板 这个模板 17年就开始在用了 今年才换了新的模板 所以二话不说 拔Fly的搜索拔了下来 适配了自己的博客了嘛 大家也都知道一个网站没有搜索是不行 不可缺少的 用户在找东西的时候 一键搜索方便 不废话了 开始教程吧 第一步 module.php模板文件增加如下代码 <? php //search:手机搜索标签 function search_tag ( $title ){ global $CACHE ; $tag_cache = $CACHE -> readCache ( 'tags' );?> <? php shuffle ( $tag_cache ); $tag_cache = array_slice ( $tag_cache , 0 , 15 ); foreach ( $tag_cache as $value ): ?> <li class = "search-go" > <a href=" <? php echo BLOG_URL ; ?> tag/ <? php echo $value [ 'tagname' ]; ?> "> <? php echo $value [ 'tagname' ]; ?>

CSS实现带箭头的提示框

╄→гoц情女王★ 提交于 2019-12-05 09:48:04
CSS实现带箭头的提示框 我们在很多UI框架中看到带箭头的提示框,感觉挺漂亮,但是之前一直不知道其原理,今天网上找了些资料算是弄清楚原理了; 先上效果图: 原理分析: 上面的箭头有没有觉得很像一个三角形,是的,它就是三角形;只不过它这个尖角是通过两个三角形来实现的; 首先新建一个div,画出提示框的轮廓 <div class="demo"></div> 给定样式: .demo{ width:100px; height:100px; position:absolute; top: 35%; left:40%; border:2px solid red; border-radius:8px; } 这样,我们简单的一个正方形提示框就出来; 关键点: 现在我们在class=“demo”的div里面加入一个子级元素div <div class="demo"> <div class="shixin"></div> </div> 添加样式: .shixin{ width:0; height:0; border:100px solid ; border-color:red green yellow blue; position: relative; top: -21%; left:15%; } 宽高都设为0;然后设置一个边框的宽度,暂且设为100,边框颜色自己设定;此时的应该是一个200

Fixed non scrolling footer inside a div?

允我心安 提交于 2019-12-05 09:39:50
I am making a small div on the center of the page which has a footer which is fixed but the div is scroll-able. According to me there are two ways to do it: Using position:fixed : Fixed position actually work relative to the browser window but I want position relative to my small div Using position:absolute : Using bottom:0; I solved the problem initially but the footer scroll with the div text. HTML : <div id="wrapper"> <div id="box"> <div id="header"> <h1>Heading</h1> </div> <div id="content"> Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text

在制作官方的时候,侧边栏的导航栏经常会要求出现二级菜单,而我们也会在两个二级导航之间加上一个分割线。当我们的需求如下图的时候,我们就需要对分割线进行处理,保证每一行的首尾都不出现分割线。

我是研究僧i 提交于 2019-12-05 09:07:40
在制作官方的时候,侧边栏的导航栏经常会要求出现二级菜单,而我们也会在两个二级导航之间加上一个分割线。当我们的需求如下图的时候,我们就需要对分割线进行处理,保证每一行的首尾都不出现分割线。 // html < div class = "wrapper" > < div class = "list" > < a href = "#" >测试 </ a > < a href = "#" >测试a </ a > < a href = "#" >测试aa </ a > < a href = "#" >测试aaa </ a > < a href = "#" >测试aaaa </ a > < a href = "#" >测试aaaaa </ a > < a href = "#" >测试aaaaaa </ a > < a href = "#" >测试aaaaaaa </ a > < a href = "#" >测试aaaaaaaa </ a > < a href = "#" >测试aaaaaaaaa </ a > </ div > </ div > // css * { padding: 0; margin: 0; } .wrapper { padding: 20px; width: 300px; height: 500px; } a { text-decoration: none;