相关疑难解决方法(0)

如何让div高度自动调整到背景大小?

如何在不设置特定高度(或最小高度)的情况下让div自动调整为我为其设置的背景大小?

html css height background

245
推荐指数
11
解决办法
42万
查看次数

如何在IE中制作背景大小的工作?

是否有任何已知的方法使CSS样式background-size在IE中工作?

css internet-explorer

188
推荐指数
5
解决办法
25万
查看次数

对象适合不影响图像

我一直在尝试使用object-fit放置在article元素内部的一些图像,但它似乎根本不会影响它们.

object-fit属性的期望值将是cover,但截至目前,其他任何值似乎都不起作用.

当我改变它的价值时,它们不会缩小,不会增长,不会......没有.

如果您看到CodePen,则两行之间会有空格,并且图像不会占用所有相同的空间/高度(正如预期的那样object-fit: cover).

这是一个CodePen

body{
	margin: 0 auto; padding: 0;
}
main{
	min-height: 70vh;
	padding: 0;
}
main > section.posts{
	box-sizing: border-box;
	margin: 0; padding: 0;
	display: flex;
	flex-flow: row wrap;
}
main > section.posts > article{
  outline: 1px solid red;
	width: 22vw;
	min-height: 100vh;
	margin: 0; padding: 0;
	flex-grow: 1;
	overflow: hidden;
	box-sizing: border-box;
}
main > section.posts > article > img{  /* Our suspect */
  object-fit: …
Run Code Online (Sandbox Code Playgroud)

html css html5 css3

33
推荐指数
5
解决办法
4万
查看次数

IE 8中的坏像素背景图像

我在Internet Explorer 8和9上遇到了一个小问题,即图像结果不符合预期.像素质量非常差,但在其他浏览器中,如chrome,opera和firefox看起来非常好.

这是我的结果:


在此输入图像描述


IE呈现的图像在圆圈上看起来是分数,这是我的CSS代码:

.social-profiles ul li.facebook a {
    background: url(img/flat-social-icons/32px/Facebook-32.png);
    text-indent: -9999;
    opacity: 0.4;
    filter: alpha(opacity=40); /* msie */ }
Run Code Online (Sandbox Code Playgroud)

html css internet-explorer background-image internet-explorer-8

2
推荐指数
1
解决办法
483
查看次数