假设有这个html:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XamarinFormsOne.Pages.GPSOwnTestPage"
BackgroundColor="{StaticResource PageBackgroundColor}">
<ContentPage.Content>
<StackLayout>
<Button x:Name="btnGetLocation"
Text="Get GPS Avability"
Clicked="Button_Clicked"/>
<Label x:Name="labelLatitude"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
TextColor="White"/>
<Label x:Name="labelLongitude"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
TextColor="White"/>
<StackLayout Orientation="Horizontal" x:Name="settingsLayout">
<Grid WidthRequest="120"/>
<Image x:Name="image1"
Source="settingsIcon.png"
HorizontalOptions="EndAndExpand"
VerticalOptions="EndAndExpand"/>
<Image x:Name="image2"
Source="settingsIcon.png"
HorizontalOptions="CenterAndExpand"
VerticalOptions="EndAndExpand"/>
<Image x:Name="image3"
Source="settingsIcon.png"
HorizontalOptions="StartAndExpand"
VerticalOptions="EndAndExpand"/>
<Grid WidthRequest="120"/>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
我需要增加字符串的大小&#34; DOG&#34; 所以我用这个css:
<a href="" class="hoverelement"><span>DOG</span></a>
但这不起作用?任何人都可以帮助我吗?
答案 0 :(得分:0)
尝试将a-element赋予hover
- 选择器。
a.hoverelement:hover span {
font-size: 20px;
}
答案 1 :(得分:0)
请改用:
.hoverelement:hover span {
font-size: 20px;
}
答案 2 :(得分:0)
您需要在span !important
中添加css
,因为它可能会被其父母的规则继承。
.hoverelement span:hover {
font-size:20px !important;
}
&#13;
<a href="" class="hoverelement"><span>DOG</span></a>
&#13;