本文整理匯總了PHP中CSS::Import方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSS::Import方法的具體用法?PHP CSS::Import怎麽用?PHP CSS::Import使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSS
的用法示例。
在下文中一共展示了CSS::Import方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: substr
$uuid = substr($chars, 0, 8) . '-';
$uuid .= substr($chars, 8, 4) . '-';
$uuid .= substr($chars, 12, 4) . '-';
$uuid .= substr($chars, 16, 4) . '-';
$uuid .= substr($chars, 20, 12);
return $prefix . $uuid;
}
if (preg_match('/^.*\\.?wetfish.net$/i', $URL['host'])) {
echo file_get_contents($_GET['url']);
return false;
$HTML = str_get_html(file_get_contents($_GET['url'] . "&load=true"));
$Unique = uuid('yay');
$CSS = new CSS();
$Data = array();
foreach ($HTML->find('style') as $Style) {
$CSS->Import($Style->innertext);
$Data = array_merge($Data, $CSS->Export('raw'));
$Style->outertext = '';
}
foreach ($HTML->find('link') as $Style) {
$CSS->Import(file_get_contents($URL['scheme'] . "://" . $URL['host'] . "/" . $Style->href));
$Data = array_merge($Data, $CSS->Export('raw'));
$Style->outertext = '';
}
foreach ($Data as $Tag => $Styles) {
if ($Styles['position'] == "relative") {
$Data['#' . $_GET['id']] = array('height' => $Styles['height'], 'width' => $Styles['width']);
}
switch ($Tag[0]) {
default:
foreach ($HTML->find($Tag) as $Derp) {