<Meta charset="utf-8">
<Meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<Meta name="viewport" content="width=device-width, initial-scale=1.0">
<Meta name="description" content="">
<Meta name="author" content="">
我试试这个
$this->Html->Meta(array('charset'=>'utf-8'));
$this->Html->Meta(array('content'=>'IE=edge,chrome=1'), array("http-equiv" => X-UA-Compatible));
$this->Html->Meta("viewport", array("content" => width=device-width,initial-sacale=1.0));
$this->Html->Meta("description");
$this->Html->Meta("author");
但它不起作用……………
解决方法:
试试这个 –
echo $this->Html->Meta(
'keywords',//name
'enter any Meta keyword here'//content
);
所以对此 –
<Meta name="viewport" content="width=device-width, initial-scale=1.0">
echo $this->Html->Meta(
'viewport',//name
'width=device-width, initial-scale=1.0'//content
);
docs了解详情和其他选项.
for charset – echo $this-> Html-> charset(‘ISO-8859-1’);
尝试 –
echo $this->Html->Meta(array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0', 'http-equiv' => "X-UA-Compatible"));