styles 相关问题

不要使用此标签。此标记目前没有单一的,明确定义的含义。它通常用于代替[css]或与[css]结合使用。它还用于有关用户界面外观和源代码格式问题的问题。

Reactjs + Webpack + CSS:如何仅对特定文件夹内的所有 css 文件应用模块明智的类映射

Reactjs + Webpack + CSS:如何仅对特定文件夹内的所有 css 文件应用模块明智的类映射 我添加了下面的代码但不起作用 { 测试:/.css$/i, 使用: [ &

回答 1 投票 0

我想从 df.shape 返回填充背景颜色

我想从 df.shape 填充背景颜色从第二行返回此颜色#A9D08E。 喜欢这张图片 在此输入图像描述 将 pandas 导入为 pd df = pd.read_excel(r'C:\Users\Beexprss\De...

回答 1 投票 0

如何使图像在img标签中看起来完整

我试图使来自网址的图像包含整个图像,但只有其中一部分可见,而不是整个图像。 这是代码: .img-流体{ 最大宽度:100%; 他...

回答 1 投票 0

使用 `Text.rich()` 或 `RichText` 时出现的字体大小问题

我使用了 Text.rich() 或 RichText,字体大小为 25。但是 RichText 的大小看起来比 Text.rich() 大,请告诉我为什么大小不同,我为两个小部件指定了字体大小 25。

回答 3 投票 0

如何使用 Bootstrap (我猜)让 iframe 填充剩余屏幕区域的宽度和高度?

我有一些标记,然后是一个 iframe。我只希望 iframe 填充当前标记的其余部分未占用的最大宽度和高度(如果有意义的话)。 代码: 嗨! 我有一些标记,然后是一个 iframe。我只是希望 iframe 填充当前标记的其余部分未占用的任何最大宽度和高度,如果这有意义的话。 代码: <h1>Hi!</h1> <br /> <input id="btnSave" type="button" value="Save" /> <br /> <br /> <br /> <iframe id="myI" src="mypage.html"></iframe> 所以在这种情况下,iframe应该占据屏幕的整个宽度,高度应该是从框架的顶部到屏幕的底部。什么风格可以实现这一目标? 在你的 CSS 中尝试一下这个。 iframe 宽度使用常规类型 100% 宽度设置,但高度设置为视口的 100%。 iframe { width: 100%; height: 100vh; } 我用最简单的方法做到了:设置高度小于100%,例如 <iframe style="width: 100%;height: 95%;position: absolute" name="result"></iframe> 更准确地说,我想它可以通过js来完成。

回答 2 投票 0

如何向 .stylelint 声明两种不同的配置

我在项目中使用 Stylelint 来检查样式。 我使用的插件只能在一个文件夹上运行。以及为整个项目完成的主要配置。 .stylelint 文件: { “分机...

回答 2 投票 0

Android 的“Theme.MaterialComponents.DayNight.DarkActionBar”和“Theme.MaterialComponents.DayNight.DarkActionBar.Bridge”有什么区别

我正在研究我的新 Android 应用程序的材质设计,我无法弄清楚“Theme.MaterialComponents.DayNight.DarkActionBar”和“Theme.MaterialCompo...”之间有什么区别

回答 1 投票 0

geoserver 2.21-SNAPSHOT导入qgis的sld文件时出现问题

我可以在geoserver 2.21.2上应用此样式,在geoserver 2.21-SNAPSHOT上验证此样式没有问题,但预览层报告 样式指定了名为“xm”的属性,未找到...

回答 1 投票 0

使用 next

我的任务是从数据库中获取十六进制代码,并且根据十六进制代码,颜色应该改变。 变量.js 常量primaryColor =“#000000”; const secondaryColor = "#ff0000&...

回答 1 投票 0

使用 sass 自动增加类特异性

我需要增加给定类选择器的类特异性。 例子: 。测试 { 颜色:#fff; } 目前我需要输入 .test.test 以增加特异性。 还有其他的方案吗...

回答 3 投票 0

上下文菜单按钮项!如何更改 ContextMenuButtonItem 颤动的样式。复制/粘贴按钮工具栏颤动

如何更改 ContextMenuButtonItem 的样式 我不想为了更改 Android 按钮的 2 种样式而重做整个功能。 也许这些风格会发生变化

回答 1 投票 0

鼠标悬停问题导致选项卡标题背景颜色发生变化

我是XAML新手,我正在设计一个包含嵌套选项卡控件的应用程序。最近我搜索了通过鼠标悬停和选定触发器来更改选项卡标题(选定=绿色,鼠标悬停=蓝色),...

回答 1 投票 0

3 个点代表 .net Maui 应用程序内容页面中的 ToolbarItems,仅在设备处于深色模式时显示

图 1 是设备处于深色模式时的情况。 图 2 是设备处于灯光模式时的情况。 我仍然可以单击它并访问我定义的工具栏项目,但图标不可见。 有什么想法吗...

回答 2 投票 0

我是一个初学者,沉迷于 VS Code 尝试使用直接格式化

VS Code 直接格式化不起作用。我被告知要使用CSS。为什么我不能通过文本编辑器使用直接格式化? 在学习如何使用 C 之前,我尝试在 VS Code 中使用直接格式化...

回答 1 投票 0

使用样式(MAUI)时,文本属性值在运行时不会更改

我使用了标签的样式,并将其文本属性绑定到 ViewModel 中的属性。最初,我使用 ViewModel 中的属性设置标签的文本值。后来我改了...

回答 1 投票 0

如何在WPF单选按钮中设计类似复选框的样式

我想要一个类似于复选框的单选按钮,所以我在字典文件中定义了一个样式,例如: 我想要一个类似于复选框的单选按钮,所以我在字典文件中定义了一个样式,例如: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfCheckBoxLikeRadiobutton"> <Style x:Key="MyRadioButton" TargetType="{x:Type RadioButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" IsHitTestVisible="False" /> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" Opacity="0"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> 并将其合并到 app.xaml 文件中,如下所示 <Application x:Class="WpfCheckBoxLikeRadiobutton.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfCheckBoxLikeRadiobutton" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Dictionary1.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> 然后在我的窗口中使用它 <GroupBox Margin="5" Padding="5"> <StackPanel > <CheckBox Content="this is checkbox" /> <RadioButton Content="this is first radio button" Style="{DynamicResource MyRadioButton}"/> <RadioButton Content="this is Second radio button" Style="{DynamicResource MyRadioButton}"/> <RadioButton Content="this is third radio button" Style="{DynamicResource MyRadioButton}"/> </StackPanel> </GroupBox> 但是为单选按钮指定样式后,该内容将消失。 我的风格有什么问题吗? 发生这种情况是因为您忽略了自己的控制内容ControlTemplate。你的风格应该是这样的: <Style x:Key="MyRadioButton" TargetType="{x:Type RadioButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" IsHitTestVisible="False" Content="{TemplateBinding Content}" /> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" Content="{TemplateBinding Content}" Opacity="0"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> 我认为你甚至可以做得更简单,让它看起来更好,只需右键单击 --> EditStyle 并用模板中的矩形替换每个椭圆。有很多动画你不会因为这种方式而丢失。 这就是我所做的,看起来不错,如果你愿意,你也可以从复选框样式中复制“CheckIcon”,使其看起来完全像一个复选框。 除了 Verbon 的答案之外,我还有一种样式,其中复选框看起来像单选按钮。 <Style x:Key="CheckBoxRadioButtonStyle" TargetType="CheckBox"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/> <Setter Property="Padding" Value="3"/> <Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/> <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/> <Setter Property="MinWidth" Value="30"/> <Setter Property="UseSystemFocusVisuals" Value="True"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="CheckBox"> <Grid BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="20"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="PointerOver"> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="OuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckOuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckOuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckGlyph"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseMediumBrush}"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="OuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckOuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckOuterEllipse"> <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckGlyph"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="CheckStates"> <VisualState x:Name="Checked"> <Storyboard> <DoubleAnimation Duration="1" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckGlyph"/> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterEllipse"/> <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckOuterEllipse"/> </Storyboard> </VisualState> <VisualState x:Name="Unchecked"> <Storyboard> <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterEllipse"/> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckOuterEllipse"/> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckGlyph"/> </Storyboard> </VisualState> <VisualState x:Name="Indeterminate"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid Height="32" VerticalAlignment="Top"> <Ellipse x:Name="OuterEllipse" Height="20" Fill="Green" Stroke="Green" Opacity="0" StrokeThickness="{ThemeResource RadioButtonBorderThemeThickness}" UseLayoutRounding="False" Width="20"/> <Ellipse x:Name="CheckOuterEllipse" Fill="White" Height="20" Opacity="1" Stroke="Gray" StrokeThickness="{ThemeResource RadioButtonBorderThemeThickness}" UseLayoutRounding="False" Width="20"/> <Ellipse x:Name="CheckGlyph" Fill="White" Height="12" Opacity="1" UseLayoutRounding="False" Width="12"/> </Grid> <ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" TextWrapping="Wrap" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> 然后将上面的样式合并到Verbon的样式中: <Grid> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" IsHitTestVisible="False" Content="{TemplateBinding Content}" Style="{StaticResource CheckBoxRadioButtonStyle}"/> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}" Content="{TemplateBinding Content}" Opacity="0" Style="{StaticResource CheckBoxRadioButtonStyle}"/> </Grid>

回答 3 投票 0

使用 NeomorphFlex 时,无法读取未定义的属性“匹配”错误

我需要在 NeomorthFlex 中使用超过 1 种样式(来自react-native-neomorph-shadows),我这样做是这样的: 常量样式使用 = [ globalStyles.button包含, { 背景颜色:

回答 1 投票 0

如何在 pandas 中设置数据框样式并写入 Excel

我需要将数据框标题的颜色背景更改为橙色: 我的 df 看起来像这样: 园区服务器端口 AZ服务器12 Eth1 AZ1 服务器12 Eth2 AZ2 服务器23 ...

回答 1 投票 0

如何在 Chrome Devtools 中将 CSS 样式部分移动到底部?

当我在 Google Chrome 上进行检查时,我同时看到了 HTML 和 CSS 部分,如下所示。 如何将 CSS 部分移动到底部,同时保留 HTML 部分在上面,如下所示?

回答 6 投票 0

如何停止在 CSS 中编写的文本/超链接上重叠悬停颜色?

将鼠标悬停在名为 nav-part2 的导航菜单的 div 中编写的文本/超链接上时,悬停会与它重叠。这会导致根本不显示文本。如何停止此操作并获取文本

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.