如何在IE和Chrome中获得相同的结果(半星).
在chrome:http://jsfiddle.net/Auqj8/
.star {
font-size: x-large;
width: 50px;
display: inline-block;
color: gray;
}
.star:last-child {
margin-right: 0;
}
.star:before {
content: '\2605';
}
.star.on {
color: gold;
}
.star.half:after {
content: '\2605';
color: gold;
margin-left: -20px;
width: 10px;
position: absolute;
overflow: hidden;
}
Run Code Online (Sandbox Code Playgroud)
在IE中:http://jsfiddle.net/86pqx/
谢谢.
我希望在我的属性为空时禁用我的网格,并在非空时启用.
在我的.XAML中:
<Grid Grid.Row="2" IsEnabled="{Binding ElementName=dgCustomers, Path=SelectedItem}">
<my:ProductsHistoryDetailView />
</Grid>
Run Code Online (Sandbox Code Playgroud)
在我的ViewModel.cs中:
public ProductHistory SelectedItem
{
get { return _SelectedItem; }
set
{
if (_SelectedItem != value)
{
_SelectedItem = value;
RaisePropertyChanged(() => SelectedItem);
}
}
}
Run Code Online (Sandbox Code Playgroud)