我已经构建了一个Laravel4.2应用程序Sputnikart
使用Bootstrap v3.2.0并将此网站作为我的投资组合的一部分,我最近发现,访问我的网站并可能访问此网站的人中,超过50%的人正在使用IE7 to IE9,虽然它在其他浏览器上运行良好,但在IE8上一切都乱七八糟。
我花了一天多的时间研究和尝试不同的方法来解决许多问题(添加了html5shiv.js和respond.js)来修复菜单折叠和变得不可行,并尝试使用Mathias Bynens (placeholder.js)文件来修复不可见的占位符,但是一旦我这样做了,我的应用程序就停止了正常的身份验证,以至于我无法登录。
我的master.blade上有常用的声明
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en">
<![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" lang="en">
<![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en">
<![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> ...我张贴这篇文章是想看看有没有人能帮助我用Bootstrap为IE7到IE9的Laravel4.2应用程序提供好的指导和资源,问题太多了,不胜枚举
谢谢
条件注释....ie6 .ie7控件.form- .ie8::-moz-placeholder{ _color:百里香;*颜色:百里香;颜色:百里香\9;}
发布于 2015-09-11 18:37:12
我在Laravel4.2应用程序与IE8的兼容性方面也遇到了类似的问题。我的网站是sirai.gim.med.up.pt/index.php/ram/create
除了IE8和更低版本之外,它在所有浏览器上都工作得很好。我的main.blade中没有声明,是不是?
<!DOCTYPE html>
<html>
<head>
<title>{{trans('views.title')}}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{HTML::style('css/main.css')}}
{{HTML::style('http://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css')}}
{{HTML::style('css/datepicker3.css')}}
{{HTML::style('css/bootstrap-table.css')}}
</head>
在这里测试刀片式服务器不工作,就像你们两个做http://validator.w3.org/nu/?doc=http%3A%2F%2Fsirai.gim.med.up.pt%2Findex.php%2Fram%2Fcreate一样
将感谢您的一些支持:)
这是我第一次以注册用户的身份在Stack Overflow上发帖,如果我在上面的答案中看不到一些解决方案,很抱歉。
发布于 2015-09-23 10:41:43
@Toni_Manshengo
在标题中添加我在问题中作为代码列出的内容
此外,您还需要将以下文件添加到您的应用程序和结束标记之上(jquery版本不得高于所示版本,因为较新版本与较旧的IE浏览器不兼容
@section ('scripts')
{{ HTML::script('js/jquery-1.11.3.min.js') }}
{{ HTML::script('js/bootstrap.min.js') }}
{{ HTML::script('js/modernizr-2.8.3.min.js') }}
{{ HTML::script('js/placeholder.min.js') }}
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->您还需要向IE7、IE8、IE9的css文件添加一些额外的样式,相当于
/* support for IE6/7 uses media, */
@media, {
.form-control::-moz-placeholder .ie6 .ie7 { color: thistle; }
}
/* support for IE8 uses \0 */
@media all\0 {
.form-control::-moz-placeholder .ie8 { color: thistle; }
}
/* support for IE9 uses \9 targets IE8 and bellow */
@media all and (monochrome:0) {
.form-control::-moz-placeholder .ie8 .ie9 { color: thistle\9; }
}
.form-control:-ms-input-placeholder {
color: #999999;
}
/* support for IE6/7 uses media, */
@media, {
.form-control:-ms-input-placeholder .ie6 .ie7{ color: thistle; }
}
/* support for IE8 uses \0 */
@media all\0 {
.form-control:-ms-input-placeholder .ie8 { color: thistle; }
}
/* support for IE9 uses \9 targets IE8 and bellow */
@media all and (monochrome:0) {
.form-control:-ms-input-placeholder .ie8 .ie9 { color: thistle\9; }
}
.form-control::-webkit-input-placeholder {
color: #999999;
}
/* support for IE6/7 uses media, */
@media, {
.form-control::-webkit-input-placeholder .ie6 .ie7 { color: thistle; }
}
/* support for IE8 uses \0 */
@media all\0 {
.form-control::-webkit-input-placeholder .ie8 { color: thistle; }
}
/* support for IE9 uses \9 targets IE8 and bellow */
@media all and (monochrome:0) {
.form-control::-webkit-input-placeholder .ie8 .ie9 { color: thistle\9; }
} 希望这篇文章能帮助你和其他仍然有很多IE8用户的人,我花了很长时间才弄明白zod
https://stackoverflow.com/questions/30611559
复制相似问题