当前位置: 首页>>代码示例>>PHP>>正文


PHP CSS::register_css_property方法代码示例

本文整理汇总了PHP中CSS::register_css_property方法的典型用法代码示例。如果您正苦于以下问题:PHP CSS::register_css_property方法的具体用法?PHP CSS::register_css_property怎么用?PHP CSS::register_css_property使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSS的用法示例。


在下文中一共展示了CSS::register_css_property方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CSSCellPadding

<?php

// $Header: /cvsroot/html2ps/css.pseudo.cellpadding.inc.php,v 1.6 2006/09/07 18:38:14 Konstantin Exp $
class CSSCellPadding extends CSSPropertyHandler
{
    function CSSCellPadding()
    {
        $this->CSSPropertyHandler(true, false);
    }
    function default_value()
    {
        return Value::fromData(1, UNIT_PX);
    }
    function parse($value)
    {
        return Value::fromString($value);
    }
    function getPropertyCode()
    {
        return CSS_HTML2PS_CELLPADDING;
    }
    function getPropertyName()
    {
        return '-html2ps-cellpadding';
    }
}
CSS::register_css_property(new CSSCellPadding());
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:27,代码来源:css.pseudo.cellpadding.inc.php

示例2: is_inline_element

    {
        $parent_display = $old_state[CSS_DISPLAY];
        if ($parent_display === "table-row") {
            $new_state[CSS_MIN_HEIGHT] = $old_state[CSS_MIN_HEIGHT];
            return;
        }
        $new_state[CSS_MIN_HEIGHT] = is_inline_element($parent_display) ? $this->get($old_state) : $this->default_value();
    }
    function _getAutoValue()
    {
        return $this->default_value();
    }
    function default_value()
    {
        return $this->_defaultValue->copy();
    }
    function parse($value)
    {
        return ValueMinHeight::fromString($value);
    }
    function getPropertyCode()
    {
        return CSS_MIN_HEIGHT;
    }
    function getPropertyName()
    {
        return 'min-height';
    }
}
CSS::register_css_property(new CSSMinHeight());
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:30,代码来源:css.min-height.inc.php

示例3: define

<?php

// $Header: /cvsroot/html2ps/css.direction.inc.php,v 1.7 2006/07/09 09:07:44 Konstantin Exp $
define('DIRECTION_LTR', 1);
define('DIRECTION_RTF', 1);
class CSSDirection extends CSSPropertyStringSet
{
    function CSSDirection()
    {
        $this->CSSPropertyStringSet(true, true, array('lrt' => DIRECTION_LTR, 'rtl' => DIRECTION_RTF));
    }
    function default_value()
    {
        return DIRECTION_LTR;
    }
    function get_property_code()
    {
        return CSS_DIRECTION;
    }
    function get_property_name()
    {
        return 'direction';
    }
}
CSS::register_css_property(new CSSDirection());
开发者ID:VUW-SIM-FIS,项目名称:emiemi,代码行数:25,代码来源:css.direction.inc.php

示例4: CSSLetterSpacing

    function CSSLetterSpacing()
    {
        $this->CSSPropertyHandler(false, true);
        $this->_default_value = Value::fromString("0");
    }
    function default_value()
    {
        return $this->_default_value;
    }
    function parse($value)
    {
        $value = trim($value);
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        if ($value === 'normal') {
            return $this->_default_value;
        }
        return Value::fromString($value);
    }
    function getPropertyCode()
    {
        return CSS_LETTER_SPACING;
    }
    function getPropertyName()
    {
        return 'letter-spacing';
    }
}
CSS::register_css_property(new CSSLetterSpacing());
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:30,代码来源:css.letter-spacing.inc.php

示例5: define

<?php

// $Header: /cvsroot/html2ps/css.html2ps.pseudoelements.inc.php,v 1.1 2006/09/07 18:38:14 Konstantin Exp $
define('CSS_HTML2PS_PSEUDOELEMENTS_NONE', 0);
define('CSS_HTML2PS_PSEUDOELEMENTS_BEFORE', 1);
define('CSS_HTML2PS_PSEUDOELEMENTS_AFTER', 2);
class CSSHTML2PSPseudoelements extends CSSPropertyHandler
{
    function CSSHTML2PSPseudoelements()
    {
        $this->CSSPropertyHandler(false, false);
    }
    function default_value()
    {
        return CSS_HTML2PS_PSEUDOELEMENTS_NONE;
    }
    function parse($value)
    {
        return $value;
    }
    function getPropertyCode()
    {
        return CSS_HTML2PS_PSEUDOELEMENTS;
    }
    function getPropertyName()
    {
        return '-html2ps-pseudoelements';
    }
}
CSS::register_css_property(new CSSHTML2PSPseudoelements());
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:30,代码来源:css.html2ps.pseudoelements.inc.php

示例6: CSSColor

<?php

// $Header: /cvsroot/html2ps/css.color.inc.php,v 1.13 2007/01/24 18:55:51 Konstantin Exp $
class CSSColor extends CSSPropertyHandler
{
    function CSSColor()
    {
        $this->CSSPropertyHandler(true, true);
    }
    function default_value()
    {
        return new Color(array(0, 0, 0), false);
    }
    function parse($value)
    {
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        return parse_color_declaration($value);
    }
    function get_property_code()
    {
        return CSS_COLOR;
    }
    function get_property_name()
    {
        return 'color';
    }
}
CSS::register_css_property(new CSSColor());
开发者ID:isantiago,项目名称:foswiki,代码行数:30,代码来源:css.color.inc.php

示例7: CSSBorder

        if (preg_match("/\\b(thin|medium|thick|[+-]?\\d+(.\\d*)?(em|ex|px|in|cm|mm|pt|pc)?)\\b/i", $value)) {
            return BORDER_VALUE_WIDTH;
        }
        if (preg_match("/\\b(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\\b/", $value)) {
            return BORDER_VALUE_STYLE;
        }
        return;
    }
}
$border = new CSSBorder();
CSS::register_css_property($border);
CSS::register_css_property(new CSSBorderColor($border));
CSS::register_css_property(new CSSBorderWidth($border));
CSS::register_css_property(new CSSBorderStyle($border));
CSS::register_css_property(new CSSBorderTop($border, 'top'));
CSS::register_css_property(new CSSBorderRight($border, 'right'));
CSS::register_css_property(new CSSBorderBottom($border, 'bottom'));
CSS::register_css_property(new CSSBorderLeft($border, 'left'));
CSS::register_css_property(new CSSBorderLeftColor($border));
CSS::register_css_property(new CSSBorderTopColor($border));
CSS::register_css_property(new CSSBorderRightColor($border));
CSS::register_css_property(new CSSBorderBottomColor($border));
CSS::register_css_property(new CSSBorderLeftStyle($border));
CSS::register_css_property(new CSSBorderTopStyle($border));
CSS::register_css_property(new CSSBorderRightStyle($border));
CSS::register_css_property(new CSSBorderBottomStyle($border));
CSS::register_css_property(new CSSBorderLeftWidth($border));
CSS::register_css_property(new CSSBorderTopWidth($border));
CSS::register_css_property(new CSSBorderRightWidth($border));
CSS::register_css_property(new CSSBorderBottomWidth($border));
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:30,代码来源:css.border.inc.php

示例8: getPropertyName

    }
    function getPropertyName()
    {
        return 'margin-left';
    }
}
class CSSMarginBottom extends CSSSubFieldProperty
{
    function parse($value)
    {
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        return MarginSideValue::init($value);
    }
    function getPropertyCode()
    {
        return CSS_MARGIN_BOTTOM;
    }
    function getPropertyName()
    {
        return 'margin-bottom';
    }
}
$mh = new CSSMargin();
CSS::register_css_property($mh);
CSS::register_css_property(new CSSMarginLeft($mh, 'left'));
CSS::register_css_property(new CSSMarginRight($mh, 'right'));
CSS::register_css_property(new CSSMarginTop($mh, 'top'));
CSS::register_css_property(new CSSMarginBottom($mh, 'bottom'));
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:30,代码来源:css.margin.inc.php

示例9: CSSBottom

 */
class CSSBottom extends CSSPropertyHandler
{
    function CSSBottom()
    {
        $this->CSSPropertyHandler(false, false);
        $this->_autoValue = ValueBottom::fromString('auto');
    }
    function _getAutoValue()
    {
        return $this->_autoValue->copy();
    }
    function default_value()
    {
        return $this->_getAutoValue();
    }
    function getPropertyCode()
    {
        return CSS_BOTTOM;
    }
    function getPropertyName()
    {
        return 'bottom';
    }
    function parse($value)
    {
        return ValueBottom::fromString($value);
    }
}
CSS::register_css_property(new CSSBottom());
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:30,代码来源:css.bottom.inc.php

示例10: CSSTextIndent

{
    function CSSTextIndent()
    {
        $this->CSSPropertyHandler(true, true);
    }
    function default_value()
    {
        return new TextIndentValuePDF(array(0, false));
    }
    function parse($value)
    {
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        if (is_percentage($value)) {
            return new TextIndentValuePDF(array((int) $value, true));
        } else {
            return new TextIndentValuePDF(array($value, false));
        }
    }
    function getPropertyCode()
    {
        return CSS_TEXT_INDENT;
    }
    function getPropertyName()
    {
        return 'text-indent';
    }
}
CSS::register_css_property(new CSSTextIndent());
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:30,代码来源:css.text-indent.inc.php

示例11: define

<?php

// $Header: /cvsroot/html2ps/css.float.inc.php,v 1.7 2006/07/09 09:07:44 Konstantin Exp $
define('FLOAT_NONE', 0);
define('FLOAT_LEFT', 1);
define('FLOAT_RIGHT', 2);
class CSSFloat extends CSSPropertyStringSet
{
    function CSSFloat()
    {
        $this->CSSPropertyStringSet(false, false, array('left' => FLOAT_LEFT, 'right' => FLOAT_RIGHT, 'none' => FLOAT_NONE));
    }
    function default_value()
    {
        return FLOAT_NONE;
    }
    function get_property_code()
    {
        return CSS_FLOAT;
    }
    function get_property_name()
    {
        return 'float';
    }
}
CSS::register_css_property(new CSSFloat());
开发者ID:VUW-SIM-FIS,项目名称:emiemi,代码行数:26,代码来源:css.float.inc.php

示例12: default_value

    }
    function default_value()
    {
        return TA_LEFT;
    }
    function value2pdf($value)
    {
        switch ($value) {
            case TA_LEFT:
                return "ta_left";
            case TA_RIGHT:
                return "ta_right";
            case TA_CENTER:
                return "ta_center";
            case TA_JUSTIFY:
                return "ta_justify";
            default:
                return "ta_left";
        }
    }
    function get_property_code()
    {
        return CSS_TEXT_ALIGN;
    }
    function get_property_name()
    {
        return 'text-align';
    }
}
CSS::register_css_property(new CSSTextAlign());
开发者ID:VUW-SIM-FIS,项目名称:emiemi,代码行数:30,代码来源:css.text-align.inc.php

示例13: CSSZIndex

<?php

class CSSZIndex extends CSSPropertyHandler
{
    function CSSZIndex()
    {
        $this->CSSPropertyHandler(false, false);
    }
    function default_value()
    {
        return 0;
    }
    function parse($value)
    {
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        return (int) $value;
    }
    function get_property_code()
    {
        return CSS_Z_INDEX;
    }
    function get_property_name()
    {
        return 'z-index';
    }
}
CSS::register_css_property(new CSSZIndex());
开发者ID:isantiago,项目名称:foswiki,代码行数:29,代码来源:css.z-index.inc.php

示例14: CSSWordSpacing

    function CSSWordSpacing()
    {
        $this->CSSPropertyHandler(false, true);
        $this->_default_value = Value::fromString("0");
    }
    function default_value()
    {
        return $this->_default_value;
    }
    function parse($value)
    {
        $value = trim($value);
        if ($value === 'inherit') {
            return CSS_PROPERTY_INHERIT;
        }
        if ($value === 'normal') {
            return $this->_default_value;
        }
        return Value::fromString($value);
    }
    function getPropertyCode()
    {
        return CSS_WORD_SPACING;
    }
    function getPropertyName()
    {
        return 'word-spacing';
    }
}
CSS::register_css_property(new CSSWordSpacing());
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:30,代码来源:css.word-spacing.inc.php

示例15: CSSPage

<?php

// $Header: /cvsroot/html2ps/css.color.inc.php,v 1.13 2007/01/24 18:55:51 Konstantin Exp $
class CSSPage extends CSSPropertyHandler
{
    function CSSPage()
    {
        $this->CSSPropertyHandler(true, true);
    }
    function default_value()
    {
        return 'auto';
    }
    function parse($value)
    {
        return $value;
    }
    function getPropertyCode()
    {
        return CSS_PAGE;
    }
    function getPropertyName()
    {
        return 'page';
    }
}
CSS::register_css_property(new CSSPage());
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:27,代码来源:css.page.inc.php


注:本文中的CSS::register_css_property方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。