我必须在打印版本中使用两个不同的标题:一个用于第一页,一个用于其他页面。我想为其他页面添加标题(固定在顶部),并使用 css display: none 作为第一页。但我对@page 没有任何影响:首先。这是我的代码:
@page :first {
.header {
display: none;
}
}
Run Code Online (Sandbox Code Playgroud)
我也尝试将 !important 放入 css 但没有任何反应。我应该怎么办?
我的webview应用程序不向下滚动.我试过这段代码:
webview.scrollView.scrollEnabled = true
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我必须将我的webview应用程序放入scrollview应用程序或webview应用程序就足够了吗?我已经尝试过,但直到现在才行.
我在ViewController.swift中的整个代码是:
import UIKit
class ViewController: UIViewController {
@IBOutlet var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
//creo una costante di tipo NSURL
let url = NSURL(string: "http://www.apple.com")
//creo una richiesta di accesso a quello specifico indirizzo
let request = NSURLRequest(URL: url!)
//abilito lo zoom nella webView
webView.scalesPageToFit = true
webView.scrollView.scrollEnabled = true
//carico la richiesta a quell'URL e aggiorna la WebView
webView.loadRequest(request)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that …Run Code Online (Sandbox Code Playgroud)