ie8 伪元素兼容性问题,请教大神们怎么解决??

webdesignerx 2017-01-13 02:36:20
http://218.84.206.87/index.php?s=/Course/Index/courseType.html
按钮是用的css伪元素写的,用ie8打开掉下去了。。

各路神仙请求帮忙
...全文
406 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
webdesignerx 2017-01-13
  • 打赏
  • 举报
回复
引用 6 楼 webyellow 的回复:
用IE8看你页面是好的。 如果还有问题, 1,写CSS HACK。 2,看我说的,用整个整个图片做背景,反正也是三个字。 3,别用伪类,固定宽度用display:block;float:left;,清理浮动。不固定宽度用display:inline-block。
我这个数据是动态加载的,跟这个有关系吗??加入我直接写静态的html就没有问题
daswcszxw 2017-01-13
  • 打赏
  • 举报
回复
用IE8看你页面是好的。


如果还有问题,
1,写CSS HACK。
2,看我说的,用整个整个图片做背景,反正也是三个字。
3,别用伪类,固定宽度用display:block;float:left;,清理浮动。不固定宽度用display:inline-block。
webdesignerx 2017-01-13
  • 打赏
  • 举报
回复
有没有大神帮我在ie下看一下网址的问题
webdesignerx 2017-01-13
  • 打赏
  • 举报
回复
引用 3 楼 jslang 的回复:

<style type="text/css">
#butt {
	position: relative;
	width: 100px;
	height: 30px;
	background-color: #66f;
	margin: 20px;
}
#butt:after {
	content: "";
	position: absolute;
	left: 100%;
	top: 0;
	width: 10px;
	height: 30px;
	background-color: #f99;
}
#butt:before {
	content: "";
	position: absolute;
	right: 100%;
	top: 0;
	width: 10px;
	height: 30px;
	background-color: #f00;
}
</style>
<div id="butt"></div>
.putton-org:before {
    content: "";
    width: 8px;
    height: 22px;
    position: absolute;
    left: -8px;
    background-image: url(../images/putton-org.png);
    background-position: 0px 0px;
}
.putton-blue:after {
    content: "";
    width: 8px;
    height: 22px;
    position: absolute;
    right: -8px;
    background-image: url(../images/putton.png);
    background-position: -12px 0;
}
天际的海浪 2017-01-13
  • 打赏
  • 举报
回复

<style type="text/css">
#butt {
	position: relative;
	width: 100px;
	height: 30px;
	background-color: #66f;
	margin: 20px;
}
#butt:after {
	content: "";
	position: absolute;
	left: 100%;
	top: 0;
	width: 10px;
	height: 30px;
	background-color: #f99;
}
#butt:before {
	content: "";
	position: absolute;
	right: 100%;
	top: 0;
	width: 10px;
	height: 30px;
	background-color: #f00;
}
</style>
<div id="butt"></div>
webdesignerx 2017-01-13
  • 打赏
  • 举报
回复
引用 1 楼 webyellow 的回复:


<style type="text/css">
.btn{
    height: 22px;
    width: 46px;
    text-align: center;
    line-height: 22px;
    color: rgb(255, 255, 255);
    position: relative;
    font-size: 12px;
    font-family: 微软雅黑;
    padding: 0px 5px;
    background: rgb(169, 205, 249);
	border-radius:8px;
}
</style>
<div class="btn">去报名</div> 

不用伪类,用CSS3,不支持的浏览器就平角。
或者用图片背景。
看我发的网址了啊,我是用图片代替的
daswcszxw 2017-01-13
  • 打赏
  • 举报
回复


<style type="text/css">
.btn{
    height: 22px;
    width: 46px;
    text-align: center;
    line-height: 22px;
    color: rgb(255, 255, 255);
    position: relative;
    font-size: 12px;
    font-family: 微软雅黑;
    padding: 0px 5px;
    background: rgb(169, 205, 249);
	border-radius:8px;
}
</style>
<div class="btn">去报名</div> 

不用伪类,用CSS3,不支持的浏览器就平角。
或者用图片背景。

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧