当前位置: 编程技术>移动开发
本页文章导读:
▪主要章节2:关于变量和环境变量的转换关系 重要章节2:关于变量和环境变量的转换关系
6.10 Variables from the Environment
Variables in make can come from the environment in which make is run. Every environment variable that make sees when it starts up is transformed into a mak.........
▪ 关于JQueryMobile中Slider的1点研究 关于JQueryMobile中Slider的一点研究
滑动条 Slider
给input的设置一个新的HTML5属性为type="range",可以给页面添加滑动条组件,可以指定它的value值(当前值),min和max属性的.........
▪ 分享一个针对抚摸设备优化的图片幻灯jQuery插件 - touchtouch 分享一个针对触摸设备优化的图片幻灯jQuery插件 - touchtouch
日期:2012-5-6 来源:GBin1.com
在线演示
本地下载
触摸设备越来越流行了,很多互联网用户都使用ipad等平板电脑来浏览网页和.........
[1]主要章节2:关于变量和环境变量的转换关系
来源: 互联网 发布时间: 2014-02-18
重要章节2:关于变量和环境变量的转换关系
6.10 Variables from the Environment Variables in make can come from the environment in which make is run. Every environment variable that make sees when it starts up is transformed into a make variable with the same name and value. However, an explicit assignment in the makefile, or with a command argument, overrides the environment. (If the ‘-e’ flag is specified, then values from the environment override assignments in the makefile. See Summary of Options. But this is not recommended practice.) Thus, by setting the variable CFLAGS in your environment, you can cause all C compilations in most makefiles to use the compiler switches you prefer. This is safe for variables with standard or conventional meanings because you know that no makefile will use them for other things. (Note this is not totally reliable; some makefiles set CFLAGS explicitly and therefore are not affected by the value in the environment.) When make runs a recipe, variables defined in the makefile are placed into the environment of each shell. This allows you to pass values to sub-make invocations (see Recursive Use of make). By default, only variables that came from the environment or the command line are passed to recursive invocations. You can use the export directive to pass other variables. See Communicating Variables to a Sub-make, for full details. Other use of variables from the environment is not recommended. It is not wise for makefiles to depend for their functioning on environment variables set up outside their control, since this would cause different users to get different results from the same makefile. This is against the whole purpose of most makefiles. Such problems would be especially likely with the variable SHELL, which is normally present in the environment to specify the user's choice of interactive shell. It would be very undesirable for this choice to affect make; so, make handles the SHELL environment variable in a special way; see Choosing the Shell.
[2] 关于JQueryMobile中Slider的1点研究
来源: 互联网 发布时间: 2014-02-18
关于JQueryMobile中Slider的一点研究
滑动条 Slider
滑动条 Slider
给input的设置一个新的HTML5属性为type="range",可以给页面添加滑动条组件,可以指定它的value值(当前值),min和max属性的值配置滑动条。Jquery Mobile会解析这些属性来配置滑动条。当你滑动滑动条时,input会随之更新数值,反之亦然,使你能够很简单的在表单里提交数值。注意要把label的for属性设为input的id值,使他们能够在语义上相关联,并且要用div容器包裹它们,并给他设定data-role="fieldcontain"属性
HTML 代码:
<div data-role="fieldcontain"> <label for="slider">Input slider:</label> <input type="range" name="slider" id="slider" value="0" min="0" max="100" /> </div>
设置min和max属性的值你可以配置滑动条上下能取到的值,而value值是用来指定滑动条初始的位置和input框内的值滑动杆同样对键盘有响应。右箭头,上箭头,Page Up 键可以用来增加当前值,左箭头,下箭头 ,Page Down键则减少当前值。Home 键和 End 键则可以分别调到滑动条的最小值和最大值。
刷新滑动条 Refreshing a slider
如果你想通过js手动控制滑动条,务必调用 refresh 方法刷新滑动条的样式
$("input[type=range]").val(60).slider("refresh");
实现代码如下:
<div data-role="fieldcontain"> <label for="slider">Input slider:</label> <input type="range" name="slider" id="slider" value="0" min="0" max="100" /></div>
在firefox或者chrome中查看html页面代码:
发现经过修饰之后代码如下:
<div data-role="fieldcontain"> <label for="slider">Slider3:</label> <input id="kk" type="number" data-type="range" max="100" min="0" value="0" name="slider"> <div role="application"> <a href="#" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c" role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="34" aria-valuetext="34" title="34" aria-labelledby="kk-label" > <span > <span ></span> </span> </a> </div> </div>
可以发现:
滑块移动的时候,滑块条为a标签实现的,那个输入框为input 类型为number标签。
在网上有哥们咨询怎么实现jquerymobile 的滑块不要那个input输入框。有以下几种方法。
第一种总简单直接隐藏的slider 实现。
如上分析直接使用:$("#kk").hide();
第二种:给一个a标签添加相关的样式实现。
方法一:
html如下:
<!-- slider 1 --> <div > <b>A range slider:</b> <span ></span> <div id="mm" value="30,60" max="100" min="10"></div> </div>脚本如下:
$(function(){ $(".range-slide").each(function() { var $this = $(this); $(".slide", $this).slider({ values: [30, 60], min: 0, max: 100, range: true, slide: function(event, ui) { $("span.amount", $this).html("" + ui.values[0] + " - " + ui.values[1]); } }); }); });
方法二:html如下:
<!-- 编码式编订 --> <div id="slider_range" > </div>js脚本如下:
$(function(){ //编码式实现相关的限制 $("#slider_range").slider({ range: 'min', min: 0, max: 40, value: 1, step: 10, slide : function(event, ui){ alert("previous value:"+ $(this).val()); }, stop: function(event, ui){ alert("Current value:"+ $(this).val()); } }); //$("#kk").hide(); });
[3] 分享一个针对抚摸设备优化的图片幻灯jQuery插件 - touchtouch
来源: 互联网 发布时间: 2014-02-18
分享一个针对触摸设备优化的图片幻灯jQuery插件 - touchtouch
日期:2012-5-6 来源:GBin1.com
在线演示 本地下载
触摸设备越来越流行了,很多互联网用户都使用ipad等平板电脑来浏览网页和网站。今天我们介绍一款来自于著名web设计师Martin的jQuery插件-touchtouch ,使用它可以快速帮助你生成一个针对平板触摸电脑优化的图片画廊。所有你需要做的只是提供一套图片地址,相信大家一定会喜欢!
主要特性- 平滑的CSS3动画和过渡特效
- 一个支持响应式布局设计的CSS接口,能够根据设备屏幕变化
- 图片预先加载
- 支持触摸滑动
- 显示箭头并且响应按键keypress
倒入插件的JS和CSS,及其jQuery1.7及其以上类库:
<link rel="stylesheet" href="/blog_article/css/touchTouch.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="/blog_article/js/touchtouch.jquery.js"></script>HTML代码
<div id="thumbs"> <a href="/blog_article/img/2011-mv-agusta-brutale-920-black-4.jpg" title="agusta-brutale-920"></a> <a href="/blog_article/img/2011-mv-agusta-brutale-920-black-10.jpg" title="agusta-brutale-920"></a> <a href="/blog_article/img/ducati-vyper-concept-luca-bar-black.jpg" title="vyper-concept-luca-bar-black"></a> <a href="/blog_article/img/2012-Ducati-1199-Panigale-18-635x475.jpg" title="Ducati-1199-Panigale"></a> <a href="/blog_article/img/2012-Ducati-1199-Panigale-20-635x475.jpg" title="Ducati-1199-Panigale"></a> <a href="/blog_article/img/2012-Ducati-1199-Panigale-21-635x475.jpg" title="Ducati-1199-Panigale"></a> <a href="/blog_article/img/2012-Ducati-Streetfighter-848-4-635x475.jpg" title="Ducati-Streetfighter-848"></a> <a href="/blog_article/img/2012-Ducati-Streetfighter-848-6-635x475.jpg" title="Ducati-Streetfighter-848"></a> <a href="/blog_article/img/2012-Ducati-Streetfighter-848-51-635x475.jpg" title="Ducati-Streetfighter-848"></a> </div>Javascript代码
....
来源:分享一个针对触摸设备优化的图片幻灯jQuery插件 - touchtouch
最新技术文章: