GVKun编程网logo

css – Sphinx内联代码突出显示(css的内联样式代码)

13

针对css–Sphinx内联代码突出显示和css的内联样式代码这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展.net–如何在Silverlight数据网格中删除鼠标悬停突出显示和选定的行突

针对css – Sphinx内联代码突出显示css的内联样式代码这两个问题,本篇文章进行了详细的解答,同时本文还将给你拓展.net – 如何在Silverlight数据网格中删除鼠标悬停突出显示和选定的行突出显示、android – 代码检查突出显示:无法为Info和Weak Warning严重性设置不同的突出显示样式、Aptana 3,PHP代码背景突出显示、asp.net mvc和css:选择时突出显示菜单选项卡等相关知识,希望可以帮助到你。

本文目录一览:

css – Sphinx内联代码突出显示(css的内联样式代码)

css – Sphinx内联代码突出显示(css的内联样式代码)

我使用Sphinx制作一个包含代码示例的网站.
我成功使用.. code-block指令来获取语法高亮.
但我无法使用此代码获得内联语法高亮:
.. role:: bash(code)
   :language: bash

Test inline: :bash:`export FOO="bar"`.

.. code-block:: bash

    export FOO="bar"

产生此输出,即内联代码未突出显示,而块代码是:

对我来说问题是生成的内联代码HTML包含长类名,而不包含代码块.
这是输出HTML(为了便于阅读而缩进):

<p>Test inline:
    <tthttps://www.jb51.cc/tag/tera/" target="_blank">teral">
        <span>
            <span>export</span>
        </span>
        <span>
            <span>FOO</span>
        </span>
        <span>
            <span>=</span>
        </span>
        <spanhttps://www.jb51.cc/tag/tera/" target="_blank">teral string double">
            <span>&quot;bar&quot;</span>
        </span>
    </tt>.
</p>


<p>Test code-block:</p>
<div>
    <div>
        <pre>
            <span>export </span>
            <span>FOO</span>
            <span>=</span>
            <span>&quot;bar&quot;</span>
        </pre>
    </div>
</div>

任何帮助将非常感谢.

解决方法

找到一个更好的(仅限斯芬克斯)解决方案:在sphinx / builders / html.py中找到一条线
from docutils.core import Publisher

并将其更改为:

from docutils.core import Publisher
def process_programmatic_settings(self,settings_spec,settings_overrides,config_section):
    if self.settings is None:
        defaults = (settings_overrides or {}).copy()
        # Propagate exceptions by default when used programmatically:
        defaults.setdefault('traceback',True)
        defaults.setdefault('Syntax_highlight','short') # ADDED THIS LINE
        self.get_settings(settings_spec=settings_spec,config_section=config_section,**defaults)
Publisher.process_programmatic_settings = process_programmatic_settings

这个解决方案比以前的解决方案更好:因为它不会使css规则的数量增加一倍,也不会修改docutils.

仍然,理想的解决方案只会改变conf.py.所以有很大的改进空间.

.net – 如何在Silverlight数据网格中删除鼠标悬停突出显示和选定的行突出显示

.net – 如何在Silverlight数据网格中删除鼠标悬停突出显示和选定的行突出显示

我有一个datagrid,每行有一个按钮(xaml如下所示).我正试图摆脱突出显示所选行的蓝色突出显示功能,以及
用鼠标划过它.我正在尝试将其设置为只需单击按钮而不会获得行选择和鼠标悬停突出显示功能.我尝试将IsHitTestVisible设置为false,但是按钮不可单击.我怎样才能做到这一点?

<data:DataGrid x:Name="GrdClinics"
               HorizontalAlignment="Left" 
               VerticalAlignment="Bottom" 
               AutoGenerateColumns="False"
               HeadersVisibility="None"
               RowHeight="55"
               Background="Transparent"
               AlternatingRowBackground="Transparent"
               RowBackground="Transparent"
               BorderBrush="Transparent"
               Foreground="Transparent" 
               GridLinesVisibility="None" 
               SelectionMode="Single">                         

    <data:DataGrid.Columns>
        <data:DataGridTemplateColumn Header="Clinic">
            <data:DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Button x:Name="btnClinic" 
                            Height="46" 
                            Width="580" 
                            Content="{Binding Path=Description}"Click="btnClinic_OnClick"
                            FontSize="24"
                            FontFamily="Tahoma"
                            FontWeight="Bold">
                        <Button.Background>
                            <LinearGradientBrush EndPoint="0.528,1.144" StartPoint="1.066,1.221">
                                <GradientStop Color="#FF000000"/>
                                <GradientStop Color="#FFEDC88F" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                </DataTemplate>
            </data:DataGridTemplateColumn.CellTemplate>
        </data:DataGridTemplateColumn>
    </data:DataGrid.Columns>
</data:DataGrid>

解决方法

简短的回答是使用样式.答案如下:

Silverlight 2.0数据网格中有两个样式属性可以解决您的问题.第一个是CellStyle,第二个是RowStyle. CellStyle属性将删除当前所选单元格周围的浅蓝色突出显示. RowStyle属性是您可以删除指示所选行的浅蓝色阴影的属性.我使用的CellStyle如下:

<Style x:Key="CellStyle" targettype="local:DataGridCell">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate targettype="local:DataGridCell">
                    <Grid Name="Root" Background="Transparent">
                        <vsm:visualstatemanager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CurrentStates" >
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0" />
                                </vsm:VisualStateGroup.Transitions>

                                <vsm:VisualState x:Name="Regular" />
                                <vsm:VisualState x:Name="Current" />
                                    <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                            </vsm:VisualStateGroup>
                        </vsm:visualstatemanager.VisualStateGroups>
                        <Grid.ColumnDeFinitions>
                            <ColumnDeFinition Width="*" />
                            <ColumnDeFinition Width="Auto" />
                        </Grid.ColumnDeFinitions>
                        <Rectangle Name="FocusVisual" stroke="#FF6DBDD1" strokeThickness="1" Fill="#66FFFFFF" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" />
                        <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                        <Rectangle Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

如果您注意到,我注释掉了改变了FocusVisual矩形的不透明度值的故事板.这样做是为了将FocusVisual矩形设置为在单元格选择上显示. (请注意:您无法删除FocusVisual元素,因为CellPresenter需要此元素,而找不到该元素将导致错误.)

我使用的RowStyle如下:

<Style targettype="local:DataGridRow" x:Key="MyCustomrow">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate targettype="local:DataGridRow">
                    <localprimitives:DataGridFrozenGrid x:Name="Root">
                        <localprimitives:DataGridFrozenGrid.Resources>
                            <Storyboard x:Key="DetailsVisibleTransition" >
                                <DoubleAnimation Storyboard.TargetName="DetailsPresenter" Storyboard.TargetProperty="ContentHeight" Duration="00:00:0.1" />
                            </Storyboard>
                        </localprimitives:DataGridFrozenGrid.Resources>
                        <vsm:visualstatemanager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates" >
                                <vsm:VisualState x:Name="normal" />
                                <vsm:VisualState x:Name="normal AlternatingRow">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0" />
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="MouSEOver" />
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".5" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="normal Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="MouSEOver Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="Unfocused Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFE1E7EC" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>-->
                            </vsm:VisualStateGroup>
                        </vsm:visualstatemanager.VisualStateGroups>
                        <localprimitives:DataGridFrozenGrid.RowDeFinitions>
                            <RowDeFinition Height="*" />
                            <RowDeFinition Height="Auto" />
                            <RowDeFinition Height="Auto" />
                        </localprimitives:DataGridFrozenGrid.RowDeFinitions>
                        <localprimitives:DataGridFrozenGrid.ColumnDeFinitions>
                            <ColumnDeFinition Width="Auto" />
                            <ColumnDeFinition Width="*" />
                        </localprimitives:DataGridFrozenGrid.ColumnDeFinitions>
                        <Rectangle x:Name="BackgroundRectangle" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="#FFBADDE9"  />
                        <localprimitives:DataGridRowHeader Grid.RowSpan="3" x:Name="RowHeader" localprimitives:DataGridFrozenGrid.IsFrozen="True" />

                        <localprimitives:DataGridCellsPresenter x:Name="CellsPresenter" localprimitives:DataGridFrozenGrid.IsFrozen="True"/>

                        <localprimitives:DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" x:Name="DetailsPresenter" />
                        <Rectangle Grid.Row="2" Grid.Column="1" x:Name="BottomGridLine" HorizontalAlignment="Stretch" Height="1" />
                    </localprimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

如你所见,我评论了一些更多的视觉状态.您需要注释掉MouSEOver VisualState故事板,normal Selected故事板,MouSEOver Selected故事板和Unfocused Selected故事板.

(请注意:我没有删除这些视觉状态,我只是评论了他们过去做过的事情.)

这是我的完整代码供参考:(首先是XAML,然后是VB)

XAML:

<UserControl x:https://www.jb51.cc/tag/SEO/" title="SEO">SEOver.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  
    xmlns:local="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows"
    xmlns:localprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
<UserControl.Resources>

    <Style x:Key="CellStyle" targettype="local:DataGridCell">

        <!-- Todo: Remove this workaround to force MouseLeftButtonDown event to be raised when root element is clicked. -->
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate targettype="local:DataGridCell">
                    <Grid Name="Root" Background="Transparent">
                        <vsm:visualstatemanager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CurrentStates" >
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0" />
                                </vsm:VisualStateGroup.Transitions>

                                <vsm:VisualState x:Name="Regular" />
                                <vsm:VisualState x:Name="Current" />
                                    <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                            </vsm:VisualStateGroup>
                        </vsm:visualstatemanager.VisualStateGroups>
                        <Grid.ColumnDeFinitions>
                            <ColumnDeFinition Width="*" />
                            <ColumnDeFinition Width="Auto" />
                        </Grid.ColumnDeFinitions>
                        <!-- Todo Refactor this if SL ever gets a FocusVisualStyle on FrameworkElement -->
                        <Rectangle Name="FocusVisual" stroke="#FF6DBDD1" strokeThickness="1" Fill="#66FFFFFF" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" />
                        <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                        <Rectangle Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style targettype="local:DataGridRow" x:Key="MyCustomrow">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate targettype="local:DataGridRow">
                    <localprimitives:DataGridFrozenGrid x:Name="Root">
                        <localprimitives:DataGridFrozenGrid.Resources>
                            <Storyboard x:Key="DetailsVisibleTransition" >
                                <DoubleAnimation Storyboard.TargetName="DetailsPresenter" Storyboard.TargetProperty="ContentHeight" Duration="00:00:0.1" />
                            </Storyboard>
                        </localprimitives:DataGridFrozenGrid.Resources>
                        <vsm:visualstatemanager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates" >
                                <vsm:VisualState x:Name="normal" />
                                <vsm:VisualState x:Name="normal AlternatingRow">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0" />
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="MouSEOver" />
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".5" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="normal Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="MouSEOver Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                    </Storyboard>
                                </vsm:VisualState>-->
                                <vsm:VisualState x:Name="Unfocused Selected"/>
                                <!--<Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                        <ColorAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FFE1E7EC" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>-->
                            </vsm:VisualStateGroup>
                        </vsm:visualstatemanager.VisualStateGroups>
                        <localprimitives:DataGridFrozenGrid.RowDeFinitions>
                            <RowDeFinition Height="*" />
                            <RowDeFinition Height="Auto" />
                            <RowDeFinition Height="Auto" />
                        </localprimitives:DataGridFrozenGrid.RowDeFinitions>
                        <localprimitives:DataGridFrozenGrid.ColumnDeFinitions>
                            <ColumnDeFinition Width="Auto" />
                            <ColumnDeFinition Width="*" />
                        </localprimitives:DataGridFrozenGrid.ColumnDeFinitions>
                        <Rectangle x:Name="BackgroundRectangle" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="#FFBADDE9"  />
                        <localprimitives:DataGridRowHeader Grid.RowSpan="3" x:Name="RowHeader" localprimitives:DataGridFrozenGrid.IsFrozen="True" />

                        <localprimitives:DataGridCellsPresenter x:Name="CellsPresenter" localprimitives:DataGridFrozenGrid.IsFrozen="True"/>

                        <localprimitives:DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" x:Name="DetailsPresenter" />
                        <Rectangle Grid.Row="2" Grid.Column="1" x:Name="BottomGridLine" HorizontalAlignment="Stretch" Height="1" />
                    </localprimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</UserControl.Resources>

<Grid x:Name="LayoutRoot" Background="White">
    <local:DataGrid x:Name="TestGrid"
           HorizontalAlignment="Left" 
           VerticalAlignment="Bottom" 
           AutoGenerateColumns="False"
           HeadersVisibility="None"
           RowHeight="55"
           Background="Transparent"
           AlternatingRowBackground="Transparent"
           RowBackground="Transparent"
           BorderBrush="Transparent"
           Foreground="Transparent" 
           GridLinesVisibility="None" 
           SelectionMode="Single"
           CellRowhttps://www.jb51.cc/tag/omr/" target="_blank">omrow}">

        <local:DataGrid.Columns>
            <local:DataGridTemplateColumn Header="Clinic">
                <local:DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Button x:Name="btnClinic" 
                        Height="46" 
                        Width="580" 
                        Content="{Binding Path=Description}" 
                        Click="btnClinic_Click"
                        FontSize="24"
                        FontFamily="Tahoma"
                        FontWeight="Bold">
                            <Button.Background>
                                <LinearGradientBrush EndPoint="0.528,1.221">
                                    <GradientStop Color="#FF000000"/>
                                    <GradientStop Color="#FFEDC88F" Offset="1"/>
                                </LinearGradientBrush>
                            </Button.Background>
                        </Button>
                    </DataTemplate>
                </local:DataGridTemplateColumn.CellTemplate>
            </local:DataGridTemplateColumn>
        </local:DataGrid.Columns>
    </local:DataGrid>
</Grid>
</UserControl>

VB:

Partial Public Class Page
Inherits UserControl

Public Sub New()
    InitializeComponent()
    Dim test As IList(Of String) = New List(Of String)
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")
    test.Add("test1")

    TestGrid.ItemsSource = test

End Sub

Private Sub btnClinic_Click(ByVal sender As System.Object,ByVal e As System.Windows.RoutedEventArgs)

End Sub
End Class

希望这可以帮助.

谢谢,斯科特

android – 代码检查突出显示:无法为Info和Weak Warning严重性设置不同的突出显示样式

android – 代码检查突出显示:无法为Info和Weak Warning严重性设置不同的突出显示样式

在Android Studio 2.1.2中,我无法设置信息严重性级别的突出显示样式(由我的代码检查配置文件确定).它显示使用弱警告样式.

我按照说明from the official docs here但没有看到Info的条目,仅用于弱警告.这感觉就像IDE中的一个错误,因为当我点击“编辑|颜色和字体”按钮时,我被带到了我在该部分中选择的最后一个项目而不是正确的项目,即“信息”(或许那是因为没有这样的“信息”项目存在).

我无法弄清楚如何将“信息”的新项目添加到“颜色和放大器”下的列表中.字体或者.

最佳答案
不推荐使用INFO严重性,如问题IDEA-137974 Cannot change the color of the “info” severity的注释中所述:

“INFO” level is deprecated since 2011 but it seems users don’t kNow
about it. I removed this severity from settings (will be available in
2016.3). If you want to have an additional severity you can always create it.

BTW in 2016.3 you will have informatION severity. Particularly,this
severity has no highlighting.

因此,您可以通过Severity – >创建自己喜欢的颜色和喜欢的颜色.编辑严重性……并改用它.

Edit severities dialog

Aptana 3,PHP代码背景突出显示

Aptana 3,PHP代码背景突出显示

有人可以帮助删除Aptana 3.2.1中突出显示的PHP代码背景.

在aptana 3的早期版本中,现在很好-所有PHP代码(在.PHP文件中)
突出显示了背景,我找不到主题,外观设置也无法更改.

屏幕截图:

解决方法:

在偏好设置>中找到设置. Aptana Studio>主题,默认的Aptana Studio主题,需要更改命名的样式-嵌入式源

asp.net mvc和css:选择时突出显示菜单选项卡

asp.net mvc和css:选择时突出显示菜单选项卡

有一个更好的方法吗?

我有一个HTML帮助扩展方法,检查当前选项卡菜单是否是所选的菜单,然后选择.selected css类.我把html.IsSelected链接放在每个li中

<li>

其中a是选项卡名称,b是分配的ViewData.

这是干净还是有更好的方法?

解决方法

如果您可以使用javascript解决方案,请查看 jQuery UI Accordion插件如何处理此问题.实际上,您可以通过在加载页面时检查请求URL来选择基于控制器的突出显示的选项卡.

或者,您可以为与选项卡的类值对应的每个选项卡设置ViewBag项.将当前选项卡的值设置为活动的css类,将其他值设置为空(或其默认值).然后你可以使用:

<li id="HoMetab"https://www.jb51.cc/tag/Meta/" target="_blank">MetabClass %>" />
<li id="OtherTab"/>

然后,在控制器中,您将为ViewData变量设置正确的值.

ViewBag.HoMetab;
ViewBag.OtherTab;

今天关于css – Sphinx内联代码突出显示css的内联样式代码的讲解已经结束,谢谢您的阅读,如果想了解更多关于.net – 如何在Silverlight数据网格中删除鼠标悬停突出显示和选定的行突出显示、android – 代码检查突出显示:无法为Info和Weak Warning严重性设置不同的突出显示样式、Aptana 3,PHP代码背景突出显示、asp.net mvc和css:选择时突出显示菜单选项卡的相关知识,请在本站搜索。

本文标签: