以下样式是所有输入标记,这意味着任何"类型"的输入标记都会被设置样式.
input {
color:#050;
font: bold 84% 'trebuchet ms',helvetica,sans-serif;
background-color:#ffffff;
border:1px solid;
border-color: #696 #363 #363 #696;
Run Code Online (Sandbox Code Playgroud)
}
如何隔离它所以所有按钮输入'类型'的样式与文本输入'类型'不同,不需要添加/使用'id','class'或'name'.
这必须是跨浏览器的解决方案.
我正在尝试在我的iPhone应用程序中创建一个透明按钮 - 创建一个复活节彩蛋.如何在不触及alpha的情况下将按钮设置为透明(当UIButton上的alpha = 0.0时,它不再响应触摸)?
谢谢.:)
我有一个Perl CGI程序,我在其中设计了一个HTML表单.如果有人点击此表单中的按钮,则执行此文件中的CGI/Perl子例程.因为表单中有多个按钮,我将其类型设置为"按钮",而不是"提交".
这是一个书店网站,我有三个按钮,每个按钮用于一种书籍(例如,我的按钮是:"科幻小说","小说"和"诗").我必须使用按钮.点击每个按钮后,会显示该类书籍列表,用户可以选择书籍.我不应该使用javascript:它应该由CGI控制.
是否有任何资源可供iPhone开发人员在其应用中使用明亮的红色和绿色按钮?我的意思是,就像预剪裁按钮一样?我发现的最接近的是Photoshop模板,有些难以切割出来.
谢谢.
我有一个textarea,我可以使用jeditable插件进行编辑,但我不想要OK和Cancel按钮.相反,我是通过单击远离textarea(模糊)来保存文本.我准备好了代码,但我不知道如何使它工作.
在运行时我正在创建一个DataTable并使用嵌套的for循环来填充表.此表我稍后将DataSource指定给gridview,并在RowDataBound上指定每个单元格的值.我想知道如何给每个单元格一个按钮并将该按钮分配给代码隐藏功能.我将有12个按钮,每个按钮将包含不同的值.如果它们都使用某种存储特定于单元格的值的事件调用相同的函数,我更愿意.
这是创建表的代码:
protected void GridViewDice_RowDataBound(object sender, GridViewRowEventArgs e)
{
DataTable diceTable = _gm.GetDice(_gameId);
for (int i = 0; i < GameRules.ColumnsOfDice; i++)
{
if(e.Row.RowIndex > -1)
{
/*This is where I'd like to add the button*/
//e.Row.Cells[i].Controls.Add(new Button);
//e.Row.Cells[i].Controls[0].Text = specific value from below
//This is where the specific value gets input
e.Row.Cells[i].Text = diceTable.Rows[e.Row.RowIndex][i].ToString();
}
}
}
Run Code Online (Sandbox Code Playgroud)
我想用这样的东西处理buttonclick:
protected void DiceButton_Click(int column, int row, int value)
{
//Do whatever
}
Run Code Online (Sandbox Code Playgroud)
有什么建议?
有没有人有任何创建三态图像按钮的指针?
我有以下内容,但我真正想要做的是拥有一个具有多个ImageSource属性的控件 <Controls.TristateButton Image="" HoverImage="" PressedImage="" />
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Horizontal" >
<Image Name="PART_Image" Source="path to normal image" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Source" Value="path to mouse over image" TargetName="PART_Image"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Source" Value="path to pressed image" TargetName="PART_Image"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Run Code Online (Sandbox Code Playgroud) 为什么Repeater中的按钮不会触发Repeater的ItemCommand事件?有没有办法强迫它这样做?ViewState已启用.
在下面的代码中,btnApprove和btnDelete是有问题的按钮:
<asp:Repeater runat="server" ID="rpt1" onitemdatabound="rpt1_ItemDataBound" onitemcommand="rpt1_ItemCommand" >
<ItemTemplate>
<table width="100%" style="margin-bottom:6px;">
<tr>
<td>
<asp:CheckBox ID="chkSelected" runat="server" Text=" " TextAlign="Right"/> Select
<asp:Button ID="btnApprove" runat="server" Width="80px" Text="Approve" />
<asp:Button ID="btnDelete" runat="server" Width="80px" Text="Delete" />
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="lblCommentStatus" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
<table width="100%" style="margin-top:6px;">
<tr>
<td><asp:Label ID="lblAuthorName" runat="server" Text="Author: " Width="60px"></asp:Label></td>
<td><asp:TextBox ID="txtAuthorName" runat="server" Width="250px"></asp:TextBox></td>
<td style="padding-left: 30px;"><asp:Label ID="lblAuthorLocation" runat="server" Text="Location: " Width="70px"></asp:Label></td>
<td><asp:TextBox ID="txtAuthorLocation" runat="server" Width="250px"></asp:TextBox></td>
</tr>
</table>
Title: <asp:TextBox ID="txtTitle" runat="server" Width="640px" Enabled="False"></asp:TextBox>
Body: …Run Code Online (Sandbox Code Playgroud) 我可以得到MouseEnter,MouseLeave和Click事件发生,但不是MouseLeftButtonDown或MouseLeftButtonUp.
这是我的XAML
<UserControl x:Class="Dive.Map.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<Canvas x:Name="LayoutRoot" MouseLeftButtonDown="LayoutRoot_MouseLeftButtonDown">
<Button x:Name="btnTest" Content="asdf" Background="Transparent" MouseLeftButtonDown="btnTest_MouseLeftButtonDown"></Button>
</Canvas>
</UserControl>
Run Code Online (Sandbox Code Playgroud)
这是我的代码
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void btnTest_MouseLeftButtonDown( object sender, MouseButtonEventArgs e )
{
btnTest.Content = DateTime.Now.ToString();
}
private void LayoutRoot_MouseLeftButtonDown( object sender, MouseButtonEventArgs e )
{
e.Handled = false;
}
}
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我希望能够在按下位于另一个班级的按钮后,在"统计"类中显示文本视图或计时器中的已用时间.实现这个最简单的方法是什么?
谢谢