我想知道是否有一种方法可以将特定的图标或精灵填充到指定的百分比-即20%或类似的水平。我正在尝试创建可响应的形状或图像,以用作各种流体图表。我知道以下不是一个很好的例子-svg也是字体形式。我想将此图像动态填充到代码中的指定百分比。
因此,假设某个数据点的读数为20%,我希望心脏以最多20%的另一种颜色(例如颜色:#DA1C5C)填充,剩下的颜色保留为原始颜色。我正在使用的代码使用的是直接图标字体,而不是图像svg,但尚未托管。
<div class="icon">
<i class="icon-doubleheart">
<img src="https://s3.amazonaws.com/yourcareassets/doubleheart.svg">
</i>
Run Code Online (Sandbox Code Playgroud)
我不希望我的jframe在任务栏中显示任何图标.基本上如果我们不指定任何IconImage
内容,那么它会显示默认图标.但在我的程序中,我不希望显示任何图标.
setUndecorated(true);
setSize(208, 58);
setImageIcon(null); // same result
Run Code Online (Sandbox Code Playgroud)
如果我将使用透明图像Icon
,即使这样,系统也会显示一个用于图标的半透明矩形.
我的问题很简单.我认为我不需要为此编码.如果有任何方法可以做到这一点,请告诉我.
可以做到的一种方法是使用JWindow
或Window
,但使用它有许多缺点,我不想这样做.
我有一个JTabbedPane
标签位置设置为LEFT.问题是每个标签中的图标不是彼此垂直对齐的.
考虑这张图:
正如你所看到的"Editar Protocolo"(第二个选项卡)的图标不完全符合"Distribuir Protocolo"(第一个选项卡)的图标排列,这也与其他标签发生.我希望所有图标都垂直对齐到左边.
这是我用来设置标签组件的代码:
...
jtabbedPane.setTabComponentAt(1, configurarJtabbedPane("Editar Protocolo", iconEditarProtocolo));
...
public JLabel configurarJtabbedPane(String title, ImageIcon icon) {
JLabel l = new JLabel(title);
l.setIcon(icon);
l.setIconTextGap(5);
l.setHorizontalTextPosition(SwingConstants.RIGHT);
return l;
}
Run Code Online (Sandbox Code Playgroud)
代码从标签左侧的 Q&A:JTabbedPane:图标中提取.
使用SHGetFileInfo()函数,我可以获取的图标的最大大小是多少?就功能状态而言,我可以获得一个32x32像素图标(AKA SHGFI_LARGEICON).但是我试图弄清楚是否有办法获得更大的像48x48像素的图标.
我发现有常数像......
public const uint SHGFI_LARGEICON = 0x000000000; // get large icon
public const uint SHGFI_SMALLICON = 0x000000001; // get small icon
public const uint SHIL_JUMBO = 0x000000004; // get jumbo icon 256x256
public const uint SHIL_EXTRALARGE = 0x000000002; // get extra large icon 48x48
public const uint SHIL_LARGE = 0x000000000; // get large icon 32x32
public const uint SHIL_SMALL = 0x000000001; // get small icon 16x16
public const uint SHIL_SYSSMALL = 0x000000003; // get icon based off of …
Run Code Online (Sandbox Code Playgroud) 在我使用FLUID POWERED TYPO3的第一步之后.
最新版本flux 7.1.2
,fluidpages 3.1.2
,fluidcontent 4.1.1
,fluidcontent_core 1.0.2
,vhs 2.1.4
我只有一个小问题......我没有在TYPO3后端看到我的FLUIDPAGES或FLUX内容元素的图标.
这是Fluidpages的图标路径 - 来自屏幕截图的图片:
typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif
Run Code Online (Sandbox Code Playgroud)
我尝试使用或不使用baseURL没有任何反应.当我将路径粘贴到浏览器中时,图标是可见的:
但是我的JS-Console说:
http://mvz.local/typo3/typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif 404 (Not Found)
Run Code Online (Sandbox Code Playgroud)
因为' typo3/
'在我的网址之后.但为什么?我在本地服务器上,没有文件许可或某事,清除缓存,删除typo3temp.
没有.我无法通过流量计或流量从我的提供商扩展中看到我的图标.我的FLUX图标也一样,标准图标是可用的,但是我的焊接形式的路径是怎样的?
我试过了:
<flux:form id="home05" options="{group: 'xy', icon: '{f:uri.resource(path: \'Public/Icons/Content/myicon.gif\')}'}">
// or
<flux:form id="home05" options="{icon: 'typo3conf/ext/my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
//
<flux:form id="home05" options="{icon: 'EXT:my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
Run Code Online (Sandbox Code Playgroud) 所有按钮上的glyphicon图标 - bootstrap不会显示在safari或chrom中
我无法解决它.请帮忙!
<link href="css/bootstrap.min.css" rel="stylesheet">
<a class="btn btn-primary" href="ClockProject/index.html"
target="_blank">View Project
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
Run Code Online (Sandbox Code Playgroud) 我正在使用mPDF生成工资单。但是,工资单中的图标一旦生成就不会显示。它只留下一个空白,就像这样:
图标应显示在突出显示的位置上。到目前为止,这是我已经完成的工作:
我正在使用Yii2 PHP框架,这是我的动作控制器:
public function actionPdf($id)
{
$model = $this->findModel($id);
$earnings = EarningDetails::find()->where(['payslip_id' => $model->_id, 'status' => 1])->all();
$deductions = DeductionDetails::find()->where(['payslip_id' => $model->_id, 'status' => 1])->all();
$html = $this->render('view', [
'model' => $model,
'earnings' => $earnings,
'deductions' => $deductions,
]);
$mpdf = new mPDF('c','A5-L','0','',0,4,1,1,0,0);
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'windows-1252';
$mpdf->SetTopMargin(0);
$user_password = User::find()->where(['_id' => $model->user_id ])->one();
$password = $user_password->fname.$user_password->lname;
$mpdf->SetProtection(array(), $password, $password);
$mpdf->WriteHTML($html);
$mpdf->Output('Payslip.pdf', 'D');
exit;
}
Run Code Online (Sandbox Code Playgroud)
我想念什么吗?请告诉我。
我喜欢使用CSS 构建此图标(使用Fontawesome).什么是CSS的最佳实践?谢谢!
我在AI中创建了一些图标,所以现在我正在寻找如何在不使用第三方应用程序(如fontastic ......)的情况下将它们转换为web图标字体
所以我需要创建自己的.ttf,.eot,.woff和.svg文件以这种方式插入它们
@font-face {
font-family: "MYFONT";
src:url("fonts/MYFONT.eot");
src:url("fonts/MYFONT.eot?#iefix") format("embedded-opentype"),
url("fonts/MYFONT.woff") format("woff"),
url("fonts/MYFONT.ttf") format("truetype"),
url("fonts/MYFONT.svg#MYFONT") format("svg");
}
Run Code Online (Sandbox Code Playgroud)
任何帮助都会非常有用:)
我将默认的ic_launcher图标替换为另一个图像,但我的图标大小有问题,我无法获得完整尺寸,如下图所示.
任何人都可以帮助我并告诉我如何使图标全尺寸?
任何帮助表示赞赏?