- 浏览: 237041 次
- 性别:
- 来自: 上海
-
文章分类
最新评论
-
newLinuxJava:
http://www.voip-info.org/wiki/v ...
asterisk App Dial 拨号 发起外呼 -
newLinuxJava:
http://www.voip-info.org/wiki/v ...
asterisk App Dial 拨号 发起外呼 -
tsinglongwu:
这种做法在Server端getValue()方法是能获得修改后 ...
client-side programming客户端修改值,但服务端获取仍然旧值的解决办法 -
Listen_ing:
zk+spring+hibernate如何配置hibernat ...
zk+hibernate+spring零配置 -
peterxq181:
严重: Method not found in org.apa ...
zk+hibernate+spring零配置
http://csssprites.org/download.html
SmartSprites 是一个基于java开发的命令行 形式的CSS Sprites生成器。它根据CSS文件中的特别注释自动合成图片,然后自动替换原来的图片,最后生成一个新的CSS文件。显然比手工上传、下载,再手工 修改CSS方便多了。
Using SmartSprites
-
Start with preparing your design (HTML, CSS, images) the usual way. Use background-image to attach images like icons, logos or e.g. x- or y-repeated backgrounds. You'll probably end up with a CSS pattern along the lines of this:
#web { width: 17px; height: 17px; background-repeat: no-repeat; background-image: url(../img/web.gif); } #logo { width: 50px; height: 50px; background-repeat: no-repeat; background-position: top right; background-image: url(../img/logo.png); } #main-box { background-repeat: repeat-x; background-position: 5px left; background-image: url(../img/top-frame.gif); }
When you've verified that the original design works as indented, you're ready to annotate it with SmartSprite's directives. -
Annotate your CSS with SmartSprites directives. SmartSprites directives must be enclosed between /** and */characters (CSS comments), which will make them transparent to the browser, when you're working on your original CSS. Inside the comments, the directives follow the common CSS syntax of property: value. After adding annotations, the original CSS will look like this (directives highlighted):
/** sprite: mysprite; sprite-image: url('../img/mysprite.png'); sprite-layout: vertical */ #web { width: 17px; height: 17px; background-repeat: no-repeat; background-image: url(../img/web.gif); /** sprite-ref: mysprite; */ } #logo { width: 50px; height: 50px; background-repeat: no-repeat; background-position: top right; background-image: url(../img/logo.png); /** sprite-ref: mysprite; sprite-alignment: right */ } #main-box { background-repeat: repeat-x; background-position: 5px left; background-image: url(../img/top-frame.gif); /** sprite-ref: mysprite; sprite-alignment: repeat; sprite-margin-top: 5px */ }
The first directive (in red) tells SmartSprites that there will be one sprite whose name is mysprite, which should be saved to ../img/mysprite.png relative to the CSS file. Images in this sprite will be laid out vertically (on top of each other).
The directive for the #web rule instructs SmartSprites to add image located at ../img/web.gif to the mysprite sprite. SmartSprites will also replace that line of CSS with properties referring to the sprite it created.
The directive for the #logo rule tells SmartSprites to add ../img/logo.png to the same sprite and align it to the right edge of the sprite image. This way, the image can be positioned towards the right edge of the box to achieve the same effect as with the original background-position: top right declaration.
Finally, the directive for the #main-box rule instructs SmartSprites to repeat the ../img/top-frame.png across the full width of the sprite image, so that the effect of background-repeat: repeat-x can be preserved. Additionally, SmartSprites will offset the image from the bottom edge of the neighbouring image in the sprite by 5px, so that the effect of background-position: 5px top is also preserved.
Below is a detailed description of SmartSprites directives, which you may find a little heavy, but it will allow you to use all the power of SmartSprites. There are two types of SmartSprites directives:
-
Sprite Image Directive, marked in red, is used to declare one sprite image, which merges some number of individual images. Sprite image directive must start with /** sprite: and must be contained in a single line. A single CSS file can contain any number of sprite image directives. The sprite image directive specifies the following properties:
- Sprite ID, syntax: sprite: unique-id, required. A unique identifier by which the sprite image will be referred to. For each unique sprite id, SmartSprites will create one sprite image.
-
Sprite image location, syntax: sprite-image: url('path/name.(png | gif | jpg)'), required. CSS file-relative path to the sprite image to be created. SmartSprites will infer the format of the image based on the extension used. Currently supported are: gif, png and jpg.
The path can contain a number of variable references of the form ${variable}. The following variables are supported and will be replaced with the corresponding content:
- sprite: Sprite ID
- md5: MD5 hash of the sprite image file created by SmartSprites. The hash will change only if the sprite image content or file format changes.
- date: timestamp taken at the time of sprite image generation. The timestamp will be different every time SmartSprites processing is run, even if the sprite images do not change
The sprite image path can contain a ? character to enable query-string-based cache busting. The portion of the path from the ? character until the end of the path will be ignored when determining the actual name of the sprite image to be written to disk.
Please note that you can put the variables anywhere in the sprite image path, e.g.
sprite-image: url('../img/logo-${md5}.png') sprite-image: url('../${date}/${sprite}.png') sprite-image: url('../sprite.png?${md5}')
- Sprite image layout, syntax: sprite-layout: vertical | horizontal, optional, default value: horizontal. Specifies whether the individual images should be laid out in the sprite image vertically (on top of each other) or horizontally (next to each other).
- Matte color, syntax: sprite-matte-color: #ff8822, optional, default value: #ffffff. Specifies the matte color that should be used to render partial transparencies on sprites saved in GIF or PNG8 formats. Note: currently only the 6-digit hexadecimal color specifications are supported. See also the PNG color depth and IE6-friendly PNG options.
- IE6 compatibility mode, syntax: sprite-ie6-mode: auto | none, optional, default value: auto. Specifies whether an IE6-compatible image for this sprite should be generated when necessary (auto) or should not be generated at all (none). See the IE6-friendly PNG option for more details.
-
Sprite Reference Directive, marked in orange, is used to tell SmartSprites that a specific individual image should be placed in the specified sprite image. The sprite reference directive must contain in one line, a background-imageCSS property specifying a CSS file-relative path to the individual image and a CSS comment starting with /** sprite-ref: . The sprite reference directive specifies the following properties:
- Sprite Reference, syntax: sprite-ref: sprite-id, required. A reference to one of the sprites declared by the sprite image directives. The individual image will be placed in the sprite with the provided identifier.
-
Sprite Alignment, syntax: sprite-alignment: left | right | top | bottom | repeat, optional, default value:left for sprites with vertical layout, top for sprites with horizontal layout. Defines the edge of the sprite image to which this individual image will be aligned. For vertically aligned sprites, the allowed values are left andright, while for horizontally aligned ones -- top and bottom. Sprite alignment can come in handy when the original background image was positioned towards the right or bottom of the box (e.g. background-position: top right).
One special alignment value is repeat. In this case, the contents of the individual image will be repeated across the whole width of a vertical sprite or the whole height of a horizontal sprite. This will allow you to use sprites for backgrounds that have background-repeat set to repeat-x or repeat-y.
Warning: the width (height) of the resulting sprite will be not smaller than the least common multiple of the widths of all individual images with alignment set to repeat in that vertical (horizontal) sprite. For example, if you have "repeated" individual images of widths (heights) 3px, 5px, 7px and 11px in one vertical (horizontal) sprite, the width (height) of that sprite will be 1155px. Therefore, use sprite-alignment: repeat with caution.
- Sprite margins, syntax: sprite-margin-(left | right | top | bottom): OFFSETpx, optional, default value:0px. The offset of this image from the left, right, top and bottom edge or the neighbouring image in the sprite. This property may be useful when the original image was not positioned exactly on the edge of the box, but had e.g. background-position: 5px left. Note: only pixel values are allowed. Shorthand version of margins property known from CSS is not yet supported here.
When you've finished annotating your CSS with SmartSprites directives, you can have SmartSprites generate the sprite images and modified CSS files for you. Before you do that, you will need to install some software SmartSprites requires and SmartSprites itself.
-
-
Obtain SmartSprites and the software it requires.
- Download and install Java JDK version 5 or above (JDK 6 recommended).
- Download SmartSprites and unpack the archive.
Now you're really ready to run SmartSprites.
-
Run SmartSprites.
- On Windows:
smartsprites --root-dir-path c:/example
On Linux:./smartsprites.sh --root-dir-path /home/user/example
-
After processing completes you should see on the screen messages similar to:
process: [java] INFO: Reading image from: C:\example\img\web.gif [java] INFO: Reading image from: C:\example\img\logo.png [java] INFO: Reading image from: C:\example\img\top-frame.gif [java] INFO: Creating sprite image of size 48 x 75 for mysprite [java] INFO: Creating CSS style sheet: C:\example\css\style-sprite.css [java] SmartSprites processing completed in 328 ms
If you notice any line containing a warning (WARN:), please read it carefully and correct the problem. Otherwise, your design may not look like the original version.
Upon successful completion, SmartSprites will create all the sprite images in the locations specified by the sprite image directives. Also, next to each processed CSS file, SmartSprites will create a corresponding CSS file with a -spritesuffix. The original CSS files will remain unchanged. To switch your design to CSS sprites, link these CSS files instead of the original ones in your HTML.
For our example, the generated CSS would look similar to this:
#web { width: 17px; height: 17px; background-repeat: no-repeat; background-image: url('../img/mysprite.png'); background-position: left -0px; } #logo { width: 50px; height: 50px; background-repeat: no-repeat; background-position: top right; background-image: url('../img/mysprite.png'); background-position: right -17px; } #main-box { background-repeat: repeat-x; background-position: 5px left; background-image: url('../img/mysprite.png'); background-position: left -64px; }
Notice that all of the SmartSprites directives have been omitted in the generated CSS file. If you still see any of them in the output file, it means these specific directives had some syntactic or semantic errors and have been ignored. Warning messages should help you to pinpoint the problems.
Also notice that SmartSprites currently doesn't remove the original background-position properties, but appends its own ones below to shadow them. Your design may break if you have background-position or background-image properties appearing below the line with SmartSprite's sprite reference directive.
- On Windows:
- Check if your design still looks the same. Chances are, it won't right away. See FAQ for some tips.
-
Tune global options. SmartSprites has a number of additional options you can specify in the command line invocation to further tune your designs.
-
--root-dir-path: directory in which SmartSprites processing should be done, required if css-files not specified or ifoutput-dir-path specified, default: not specified.
SmartSprites will process all files with the *.css extension found in root-dir-path or any subdirectory of it. For more fine-grained control over the processed CSS files, see the css-files option.
If the provided root directory path is relative, it will be resolved against the current working directory.
-
--css-files: paths of CSS files to process, required if root-dir-path not specified, default: not specified.
SmartSprites will process all CSS files listed using this option. If css-files is to be used together with output-dir-path, root-dir-path must also be specified so that SmartSprites can preserve the directory structure found inroot-dir-path in output-dir-path. If root-dir-path and output-dir-path are used, css-files outside ofroot-dir-path will be ignored.
Relative CSS file paths provided using this option will be resolved against the current working directory. Please note that SmartSprites will not expand any wildcards (like style/*.css), it assumes the expansion is performed at the command line shell level.
To specify the list of CSS files to process in the SmartSprites Ant task, use one or more nested fileset elements. Please see the build.xml file in the distribution archive for an example.
-
--output-dir-path: output directory for processed CSS files and CSS-relative sprite images, optional, default: not specified.
If a non-empty output-dir-path is specified, a non-empty root-dir-path must also be provided. The directory structure relative to the root-dir-path will be preserved in the output directory. E.g. if CSS files are contained in the css/base directory of root-dir-path, the processed results will be written to output-dir-path/css/base. Also, CSS-relative sprite images will be written to the output directory. Sprite images with document-root-relative URLs will be written relative to the document-root-dir-path. If the output-dir-path directory does not exist, it will be created. If the provided output directory path is relative, it will be resolved against the current working directory.
You can leave the output-dir-path empty, in which case the CSS files will be written next to the original CSS files with the css-file-suffix, and sprite images will be written relative to the original CSS files. If you are using a non-empty output-dir-path, you might want to use an empty css-file-suffix.
-
--document-root-dir-path: Document root path for document-root-relative (starting with /) image urls in CSS, optional, default: not specified.
All document-root-relative image and sprite URLs will be taken relative to document-root-dir-path. Also document-root-relative sprite URLs will be written relative to document-root-dir-path. You can leave this property empty if your CSS uses only CSS-relative image URLs. If the provided document root directory path is relative, it will be resolved against the current working directory.
-
--log-level: Message logging level, optional, default: INFO.
Messages less important than log-level will not be shown. SmartSprites has 3 levels of log messages (in the increasing order of importance):
- INFO: information messages, can be safely ignored
- IE6NOTICE: notices related to possible quality loss when creating IE6-friendly sprite images, see also the IE6-friendly PNG option
- WARN: warnings related to syntax, IO and sprite rendering quality loss problems that may cause the converted sprite-based designs look broken
-
--sprite-png-depth: Color depth of sprites in the PNG format, optional, default: AUTO.
- AUTO: PNG color depth will be chosen automatically. If the sprite image does not contain partial transparencies (alpha channel) and has less than 256 colors, PNG8 will be used. Otherwise, the sprite will be saved in PNG24.
- DIRECT: PNG sprites will always be saved in the PNG24 format.
- INDEXED: PNG sprites will always be saved in the PNG8 format. If the sprite image contains partial transparencies (alpha channel) or has more than 255 colors, image quality loss may occur and appropriate warnings will be issued. See also the sprite-matte-color property.
-
--sprite-png-ie6: Enables generation of IE6-friendly sprite images, optional, default: disabled.
If sprite-png-ie6 is specified, for each PNG sprite image with partial transparencies (alpha channel) or more than 255 colors and any transparencies, SmartSprites will generate a corresponding color-reduced PNG8 file for IE6. An extra IE6-only CSS rule will be added to the generated CSS file to ensure that IE6 (and only IE6) uses the color-reduced version:
#web { width: 17px; height: 17px; background-repeat: no-repeat; background-image: url('../img/mysprite.png'); -background-image: url('../img/mysprite-ie6.png'); background-position: left -0px; }
See also the sprite-matte-color property.
- --css-file-encoding: The encoding to assume for input and output CSS files, default: UTF-8. For the list of allowed values, please see the list of encodings supported in Java.
- --css-file-suffix: Suffix to be appended to the processed CSS file name, optional, default: -sprite.
-
--root-dir-path: directory in which SmartSprites processing should be done, required if css-files not specified or ifoutput-dir-path specified, default: not specified.
- Integrate SmartSprites with your build scripts. SmartSprites comes with an Ant that performs sprite processing and has exactly the same options as the command line invocation. For an example invocation of the task, please take a look at thebuild.xml script, whose process task reads parameters from smartsprites.properties and generates sprites. Please note that, contrary to the command line interface, the Ant task resolves all relative paths against the directory in which thebuild.xml script is located.
发表评论
-
JavaScript 秘-密-花-园
2011-11-25 12:44 1076简介 JavaScript 秘-密-花-园是一个不 ... -
web设计showcase网站
2011-10-04 22:06 1265http://www.smileycat.com ... -
zk主题生成器
2011-09-27 20:37 1824生成器在附件内,兼容zk3.x 与zk5.x,zkth ... -
浏览器如何工作的
2011-09-22 10:46 1097英文原文 : http://taligarsiel.com/P ... -
zk服务器端获取鼠标点击位置
2011-09-08 22:24 2753index.zul <?xml version=&qu ... -
非常漂亮的免费图标
2011-09-02 11:31 1071网站:http://findicons.com/search/ ... -
zk Fiddle-zk在线测试保存代码分享平台
2011-09-02 10:40 2090http://zkfiddle.org/ 是zk项目组之一To ... -
zksample2-一个复杂应用的zk示例
2011-09-02 10:32 2156Zksample2 is a demo application ... -
zk5.0.8发布
2011-08-31 18:02 1233该版本是一个维护版本,主要于bug修复及引入几个新特性 ... -
zk数据绑定
2011-08-21 23:53 3909简介: 关于数据绑定:数据绑定是一种机制,在UI组件和数据源 ... -
zk EE/PE/CE的区别
2011-08-18 10:32 4517自从zk5.0以后,zk拆分为 EE / PE / CE ... -
ZK 5.0.8 新特性
2011-08-17 19:03 37318月16日,zk官网:zk5.0.8将要发布 z ... -
js中理解变量的声明
2011-08-17 18:02 1018要点: 1,函数内声明的变量,无论在哪里声明,作 ... -
zk client与server code结合提高长操作的响应性
2011-08-17 15:58 1338一,关于长操作与响应性 zk client ... -
zk tooltiptext中换行
2011-06-10 23:10 2341<window title="My ... -
zk下载文件中文乱码解决方案
2011-06-02 11:44 3854本文来自http://sun4love.iteye.co ... -
【zk视频】如何了解一个组件默认支持服务器端事件
2011-05-25 15:48 1318如何了解一个组件默认支持服务器端事件? 知识点:在 ... -
【zk视频】如何查看zk源码,了解zk原理
2011-05-25 15:09 1451当org.zkoss.zul.Window关闭时,zk是如何工 ... -
ZK 5.0.7发布,及新特性
2011-05-12 09:27 1352ZK是一套以 AJAX/XUL/Java 为基础的网页应用程式 ... -
use【组件公共属性】
2011-04-12 22:52 1241语法 apply="a-class-nam ...
相关推荐
SmartSprites:正确完成CSS Sprite Generator CSS Sprites Generator完成。 SmartSprites完全自动维护设计中CSS Sprite。 添加或更改拼接图像时,无需繁琐的复制和粘贴到CSS。快速开始下载SmartSprites二进制文件跑...
你改变了一些东西,它改变了整个版本重新编译的 smartsprites 可以在与 google-collections 稳定版本没有冲突的情况下工作您可以忽略基于正则表达式的资源,以免被类似的东西缩小代码: uiperformance....
1、文件内容:sblim-gather-provider-2.2.8-9.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/sblim-gather-provider-2.2.8-9.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、更多资源/技术支持:公众号禅静编程坊
本图书进销存管理系统管理员功能有个人中心,用户管理,图书类型管理,进货订单管理,商品退货管理,批销订单管理,图书信息管理,客户信息管理,供应商管理,库存分析管理,收入金额管理,应收金额管理,我的收藏管理。 用户功能有个人中心,图书类型管理,进货订单管理,商品退货管理,批销订单管理,图书信息管理,客户信息管理,供应商管理,库存分析管理,收入金额管理,应收金额管理。因而具有一定的实用性。 本站是一个B/S模式系统,采用Spring Boot框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得图书进销存管理系统管理工作系统化、规范化。本系统的使用使管理人员从繁重的工作中解脱出来,实现无纸化办公,能够有效的提高图书进销存管理系统管理效率。 关键词:图书进销存管理系统;Spring Boot框架;MYSQL数据库
2024中国在人工智能领域的创新能力如何研究报告.pdf
人脸识别项目实战
人脸识别项目实战
人脸识别项目实战
内容概要:本文档详细介绍了基于CEEMDAN(完全自适应噪声集合经验模态分解)的方法实现时间序列信号分解的具体项目。文中涵盖项目背景介绍、主要目标、面临的挑战及解决方案、技术创新点、应用领域等多方面内容。项目通过多阶段流程(数据准备、模型设计与构建、性能评估、UI设计),并融入多项关键技术手段(自适应噪声引入、并行计算、机器学习优化等)以提高非线性非平稳信号的分析质量。同时,该文档包含详细的模型架构描述和丰富的代码样例(Python代码),有助于开发者直接参考与复用。 适合人群:具有时间序列分析基础的科研工作者、高校教师与研究生,从事信号处理工作的工程技术人员,或致力于数据科学研究的从业人员。 使用场景及目标:此项目可供那些面临时间序列数据中噪声问题的人群使用,尤其适用于需从含有随机噪音的真实世界信号里提取有意义成分的研究者。具体场景包括但不限于金融市场趋势预测、设备故障预警、医疗健康监控以及环境质量变动跟踪等,旨在提供一种高效的信号分离和分析工具,辅助专业人士进行精准判断和支持决策。 其他说明:本文档不仅限于理论讲解和技术演示,更着眼于实际工程项目落地应用,强调软硬件资源配置、系统稳定性测试等方面的细节考量。通过完善的代码实现说明以及GUI界面设计指南,使读者能够全面理解整个项目的开发流程,同时也鼓励后续研究者基于已有成果继续创新拓展,探索更多的改进空间与发展机遇。此外,针对未来可能遇到的各种情况,提出了诸如模型自我调整、多模态数据融合等发展方向,为长期发展提供了思路指导。
监护人,小孩和玩具数据集 4647张原始图片 监护人 食物 孩子 玩具 精确率可达85.4% pasical voc xml格式
人脸识别项目实战
人脸识别项目实战
在智慧园区建设的浪潮中,一个集高效、安全、便捷于一体的综合解决方案正逐步成为现代园区管理的标配。这一方案旨在解决传统园区面临的智能化水平低、信息孤岛、管理手段落后等痛点,通过信息化平台与智能硬件的深度融合,为园区带来前所未有的变革。 首先,智慧园区综合解决方案以提升园区整体智能化水平为核心,打破了信息孤岛现象。通过构建统一的智能运营中心(IOC),采用1+N模式,即一个智能运营中心集成多个应用系统,实现了园区内各系统的互联互通与数据共享。IOC运营中心如同园区的“智慧大脑”,利用大数据可视化技术,将园区安防、机电设备运行、车辆通行、人员流动、能源能耗等关键信息实时呈现在拼接巨屏上,管理者可直观掌握园区运行状态,实现科学决策。这种“万物互联”的能力不仅消除了系统间的壁垒,还大幅提升了管理效率,让园区管理更加精细化、智能化。 更令人兴奋的是,该方案融入了诸多前沿科技,让智慧园区充满了未来感。例如,利用AI视频分析技术,智慧园区实现了对人脸、车辆、行为的智能识别与追踪,不仅极大提升了安防水平,还能为园区提供精准的人流分析、车辆管理等增值服务。同时,无人机巡查、巡逻机器人等智能设备的加入,让园区安全无死角,管理更轻松。特别是巡逻机器人,不仅能进行360度地面全天候巡检,还能自主绕障、充电,甚至具备火灾预警、空气质量检测等环境感知能力,成为了园区管理的得力助手。此外,通过构建高精度数字孪生系统,将园区现实场景与数字世界完美融合,管理者可借助VR/AR技术进行远程巡检、设备维护等操作,仿佛置身于一个虚拟与现实交织的智慧世界。 最值得关注的是,智慧园区综合解决方案还带来了显著的经济与社会效益。通过优化园区管理流程,实现降本增效。例如,智能库存管理、及时响应采购需求等举措,大幅减少了库存积压与浪费;而设备自动化与远程监控则降低了维修与人力成本。同时,借助大数据分析技术,园区可精准把握产业趋势,优化招商策略,提高入驻企业满意度与营收水平。此外,智慧园区的低碳节能设计,通过能源分析与精细化管理,实现了能耗的显著降低,为园区可持续发展奠定了坚实基础。总之,这一综合解决方案不仅让园区管理变得更加智慧、高效,更为入驻企业与员工带来了更加舒适、便捷的工作与生活环境,是未来园区建设的必然趋势。
本届年会的主题是“青春梦想创新创业”。通过学术论文报告、创新创业项目展示、创业项目推介、工作研讨、联谊活动、大会报告等活动,全面展示大学生最新的创新创业成果。年会共收到491所高校推荐的学术论文756篇、创新创业展示项目721项、创业推介项目156项,合计1633项,为历届年会数量最高。经过36所“985”高校相关学科专家的初评以及国家级大学生创新创业训练计划专家组的复选,最终遴选出可参加本次年会的学术论文180篇,创新创业展示项目150个,创业推介项目45项,共计375项,涉及30个省市的236所高校。年会还收到了来自澳门特别行政区、俄罗斯的13项学术论文及参展项目。这些材料集中反映了各高校最新的创新创业教育成果,也直接体现了当代大学生的创新思维和实践能力。
人脸识别项目实战
6ES7215-1AG40-0XB0_V04.04.01固件4.5
在无人机上部署SchurVins的yaml配置文件
uniapp实战商城类app和小程序源码,包含后端API源码和交互完整源码。
基于MobileNet轻量级网络实现的常见30多种食物分类,包含数据集、训练脚本、验证脚本、推理脚本等等。 数据集总共20k左右,推理的形式是本地的网页推理
2024年央国企RPA市场研究报.pdf