我新推出了一款新的应用程序。我正在使用创建的默认app.component。什么是在应用程序中制作所有字体arial的最简单方法?我想我可以像这样为身体创建一个css定义,将视图中的所有字体显示为arial:
body
{
font-family:arial;
font-size:12px;
}
我几个月没用过CSS。这个css声明是不正确还是在为声明视图的css样式时有一些注意事项?
答案 0 :(得分:0)
你的css在某个地方被你的项目覆盖了。如果您想强制应用CSS,请申请!important标记。
CREATE TABLE #CombinedSales(
WeekNumber int,
WeekStart varchar(11),
StoreNumber int,
Address nvarchar(255),
City nvarchar(255),
Province varchar(2),
WeeklySales2017 decimal(13,2),
WeeklySales2018 decimal(13,2)
)
INSERT INTO #CombinedSales
SELECT 1, '19-Feb-2018', 1234, '123 Any Street', 'Calgary', 'AB', 12345.67, 23456.78
UNION ALL
SELECT 1, '19-Feb-2018', 2345, '555 First Street', 'Toronto', 'ON', 33.25, 746.52
UNION ALL
SELECT 2, '26-Feb-2018', 1234, '123 Any Street', 'Calgary', 'AB', 12345.67, 23456.78
UNION ALL
SELECT 2, '26-Feb-2018', 2345, '555 First Street', 'Toronto', 'ON', 33.25, 746.52
UNION ALL
SELECT 3, '05-Mar-2018', 1234, '123 Any Street', 'Calgary', 'AB', 12345.67, 23456.78
UNION ALL
SELECT 3, '05-Mar-2018', 2345, '555 First Street', 'Toronto', 'ON', 33.25, 746.52
UNION ALL
SELECT 4, '12-Mar-2018', 1234, '123 Any Street', 'Calgary', 'AB', 12345.67, 23456.78
UNION ALL
SELECT 4, '12-Mar-2018', 2345, '555 First Street', 'Toronto', 'ON', 33.25, 746.52
UNION ALL
SELECT 5, '19-Mar-2018', 1234, '123 Any Street', 'Calgary', 'AB', 12345.67, 23456.78
UNION ALL
SELECT 5, '19-Mar-2018', 2345, '555 First Street', 'Toronto', 'ON', 33.25, 746.52
-- create the dynamic columns
DECLARE @COLUMNS nvarchar(MAX)
SELECT @COLUMNS = SUBSTRING(
(SELECT ', ' + QUOTENAME(WeekStart + '_WeeklySales2017'),
+ ', ' + QUOTENAME(WeekStart + '_WeeklySales2018')
FROM (SELECT DISTINCT TOP 100 PERCENT WeekNumber, WeekStart FROM #CombinedSales WHERE WeekNumber IS NOT NULL ORDER BY WeekNumber) R
ORDER BY WeekNumber DESC -- most-recent date displayed first in pivot table report
For XML PATH ('')
), 2, 10000)
PRINT @COLUMNS
-- build the dynamic pivot
DECLARE @PIVOT_SQL nvarchar(MAX)
SET @PIVOT_SQL = N'SELECT *
FROM (
SELECT StoreNumber,
Address,
City,
Province,
COL_A = CAST(WeekStart as varchar(11)) + ''_'' + COL_A,
VALUE_A
FROM #CombinedSales
CROSS APPLY( SELECT ''WeeklySales2017'', ISNULL(WeeklySales2017, 0)
UNION ALL
SELECT ''WeeklySales2018'', ISNULL(WeeklySales2018, 0)
) c (COL_A, VALUE_A)
) d
PIVOT(MAX(VALUE_A) FOR COL_A IN(' + @COLUMNS + ')
) PIV'
PRINT @PIVOT_SQL
EXEC sp_executesql @PIVOT_SQL
DROP TABLE #CombinedSales