当前位置:首页 > Web开发 > 正文

在ASP.NET MVC 3剃刀视图中

2024-03-31 Web开发

在ASP.NET MVC 3剃刀视图中,,我有代码:  <!DOCTYPE html> <html> <head> <style type="text/css"> @media print { table { page-break-inside:auto; width: 100%; } tr { page-break-inside:avoid; page-break-after:auto } thead { display:table-header-group } tfoot { display:table-footer-group } } </style> </head> <body> <table>

但是我收到错误: 

The name ‘media‘ does not exist in the current context.

感谢。 

@是Razor中的保存字符。但是你可以使用@@来逃避它:  @@media print

css – 当前上下文中不存在“media”的名称

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/32442.html