Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用css为asp:按钮创建图标?_C#_Asp.net - Fatal编程技术网

C# 如何使用css为asp:按钮创建图标?

C# 如何使用css为asp:按钮创建图标?,c#,asp.net,C#,Asp.net,使用css为asp.net中的按钮设置图标图像。设置图标位置和图标大小。您可以这样做 您必须为这些添加jQueryUI1.8.5 检查一下这里的小提琴 HTML: 将控件更改为ImageButton或像@Bharat那样使用JQuery脚本。如果可以,最好使用ImageButton <div class="demo"> <button id="dynabutton">Button with gear icon</button> <button i

使用css为asp.net中的按钮设置图标图像。设置图标位置和图标大小。

您可以这样做

您必须为这些添加jQueryUI1.8.5

检查一下这里的小提琴

HTML:


将控件更改为ImageButton或像@Bharat那样使用JQuery脚本。

如果可以,最好使用ImageButton
<div class="demo">
  <button id="dynabutton">Button with gear icon</button>
  <button id="swap">Swap icons</button>
</div>
$(function() {
$( "#dynabutton" ).button({
    icons: { primary: "ui-icon-gear" },
    text: false
});
$( "#swap" ).button({
    icons: { primary: "ui-icon-locked" },
    text: true
}).click(function() {
    $( "#dynabutton" ).button("option", {
      icons: { primary: "ui-icon-locked" }
    });
});         
});