styles

Styling HTML5 number input

浪尽此生 提交于 2019-12-13 02:23:56
问题 Is it possible to style the default HTML5 input type="number" to look something like this: Or do I have to use additional elements for the 'arrows'? Couldn't find the CSS selectors for them. JsFiddle HTML: <input class="qnt amount" name="qnt" min="1" max="100" type="number" value="1"> CSS: input{ display:block; margin-top:12px; text-align:center; width:125px; height:30px; outline:1px solid black; border:none; } 回答1: You can't. Form fields are drawn by the underliyng chrome (meaning browser/OS

How can I create a custom styled EntryElement with MonoTouch.dialog?

十年热恋 提交于 2019-12-13 02:19:17
问题 I am trying to create a custom entry element using monotouch.dialog. I understand how to subclass a StringElement to style my own string elements - see example below: public class CustomStyledStringElementPlain : MonoTouch.Dialog.StyledStringElement { public CustomStyledStringElementPlain (string _caption, UIColor _backgroundcolour, UITextAlignment _alignment) : base(string.Empty,string.Empty) { TextColor = UIColor.White; Font = UIFont.FromName ("Helvetica-Bold", 14f); Caption = _caption;

After a “SetterCollectionBase” is in use (sealed), it cannot be modified

与世无争的帅哥 提交于 2019-12-13 02:12:20
问题 <UserControl x:Class="FlowItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300"> <UserControl.Resources> <Style TargetType="Label"> <Style.Setters> <Setter Property="Background" Value="AliceBlue" ></Setter> </Style.Setters> </Style> </UserControl.Resources> <DockPanel Height="300" Width="300" LastChildFill="False" Background="Transparent"> <Label Height="28" DockPanel.Dock="Top"></Label> <Label

ActionBar appearing in different colors with different versions of Android

雨燕双飞 提交于 2019-12-13 01:50:15
问题 I know the question seems simple, but not anything like chei here before. So there you go: In my android application using the Support Library with AppCompat v7, added an ActionBar. Everything works perfectly, except that when the application runs on android 2.3, the background of the ActionBar is dark, and when the squeegee android 4.0.2 ActionBar this background turns gray. Below is how to define my @style <resources> <!-- Base application theme, dependent on API level. This theme is

Only the last MenuItem gets the Icon

我的梦境 提交于 2019-12-13 01:37:32
问题 I know there are other threads about this but in my case its a bit different. I like to use an icon from a separate resource assembly <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsCheckable" Value="true" /> <Condition Property="IsChecked" Value="true" /> <Condition Property="Role" Value="SubmenuItem" /> </MultiTrigger.Conditions> <Setter Property="Icon"> <Setter.Value> <Image Margin="1,0" Width="16" Source="pack://application:,,,/MyResourceAssembly; component/Resources

using different itemcontainerstyles based on objecttype

佐手、 提交于 2019-12-13 01:34:55
问题 I have a Listbox with an collection ObservableCollection<BaseObject> _baseObjects; public ObservableCollection<BattlegroundBaseObject> BaseObject { get { return _baseObjects?? (_baseObjects= new ObservableCollection<BaseObject>()); } } the collection has two different children from BaseObject. one is a path the other an image.. more are coming i need now two different ItemContainerStyles based on the childrens <ListBox.ItemContainerStyle> <Style BasedOn="ListBoxItem" TargetType="ListBoxItem"

wants to have multiple text display styles in a single textview

喜你入骨 提交于 2019-12-13 00:55:34
问题 I am working on an android app i want to know how i can make few words in bold regular and few in italic for example i have a textview with a text HELLOO now I want to display the text like this in a text view HELL OO please tell me how to achieve this through styles in android?? 回答1: Say, you have a TextView namely etx , use the following code: final SpannableStringBuilder sb = new SpannableStringBuilder("HELLOO"); final StyleSpan bss = new StyleSpan(android.graphics.Typeface.BOLD); // Span

Changing div styles using a javascript timer with different intervals

五迷三道 提交于 2019-12-13 00:10:13
问题 Currently I have the following code creating my timer: <script type="text/javascript"> var interval; var minutes = 8; var seconds = 10; function countdown(element) { interval = setInterval(function() { var el = document.getElementById(element); if(seconds == 0) { if(minutes == 0) { alert(el.innerHTML = "countdown's over!"); clearInterval(interval); return; } else { minutes--; seconds = 60; } } if(minutes > 0) { var minute_text = minutes + (minutes > 1 ? ' minutes' : ' minute'); } else { var

Android - how to specify special attribute to some specific view in different theme

妖精的绣舞 提交于 2019-12-13 00:09:31
问题 I am working on a "dynamic change theme" function of my app (light and dark). I have some special customized widget which is using special color. And I also want to specify the color of this widget in theme attributes. For example, I want to set an attribute in the theme like <item name="MySpecialTextColor">@color/white</item> In the layout, how can I set the text color of the TextView? <TextView ... android:color="XXXX????" ... /> How can I achieve this? 回答1: First, define two colors in /res

CSS style to inline style via JavaScript

℡╲_俬逩灬. 提交于 2019-12-13 00:08:53
问题 I want to add all CSS styles of a specific element to it's inline style attribute. for example: I have: <div id="d"></div> and: #d { background: #444444; width: 50px; height: 20px; display: inline-block; } Now I want a JavaScript function that turns my div into this: <div id="d" style="background: #444444; width: 50px; height: 20px; display: inline-block;"></div> Please help me. And, by the way, I don't want any CSS styles to re-write any existing inline style. 回答1: You can do something like