承接 oscarotero/inline-svg 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oscarotero/inline-svg

Composer 安装命令:

composer require oscarotero/inline-svg

包简介

PHP library to embed svg in the html

关键字:

README 文档

README

PHP library to embed svg icons in the html pages so you can use css to change the style. Why do not use icon fonts? Here a comparison svg vs fonts

Requirements:

Installation

This package is installable and autoloadable via Composer as oscarotero/inline-svg.

$ composer require oscarotero/inline-svg

Usage:

use InlineSvg\Collection;
use InlineSvg\Transformers\Cleaner;

$icons = Collection::fromPath('path/to/svg/files');

//Add a cleaner transformer to remove ids
$icons->addTransformer(new Cleaner());

//Insert the svg code of the file 'edit.svg':
echo $icons->get('edit'); // <svg ... </svg>

//Modify any attribute
echo $icons->get('edit')->withAttribute('class', 'big-icon'); // <svg class="big-icon" .. </svg>

//Make the svg accesible
echo $icons->get('edit')->withA11y('The edit icon'); // <svg role="img" aria-labelledby="icon-edit-123-title"><title id="icon-edit-123-title">The edit icon</title> .. </svg>

统计信息

  • 总下载量: 34.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固