Java 的 CSS 解析器 jStyleParser

码农软件 · 软件分类 · 常用工具包 · 2019-08-13 08:11:53

软件介绍

jStyleParser 是一个开源 Java 的 CSS 解析器,可以在 Java 程序中解析 CSS 样式文件。

Maven

<dependency>
    <groupId>net.sf.cssbox</groupId>
    <artifactId>jstyleparser</artifactId>
    <version>3.2</version>
</dependency>

示例代码:

//get the element style
StyleMap map = CSSFactory.assignDOM(doc, encoding, base, medium, true);
NodeData style = map.get(element);
//get the type of the assigned value
CSSProperty.Margin mm = style.getProperty("margin-top");
System.out.println("margin-top=" + mm);
//if a length is specified, obtain the exact value
if (mm == Margin.length)
{
    TermLength mtop = style.getValue(TermLength.class, "margin-top");
    System.out.println("value=" + mtop);
}

本文地址:https://www.codercto.com/soft/d/12253.html

互联网黑洞

互联网黑洞

仲昭川 / 电子工业出版社 / 2014-4 / 50.00

万物之灵,存乎一心;互联网时代,上兵伐谋。 纵横古今商业奥秘,无非兴趣与利益、诱惑与满足、成本与利润、价格与价值。 本书着眼于大互联网时代,旨在通过对时下互联网圈子的冷静分析、传奇披露、实战揭秘,进而传授互联网哲学,阐述互联网现状,揭示互联网价值,尝试为互联网的未来探寻狭窄的通道。一起来看看 《互联网黑洞》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具