草庐IT

backGround

全部标签

css - 使 div 可滚动

我有一个div,我在其中显示许多与用于过滤数据的笔记本电脑相关的内容。随着其中数据大小的增加,div的大小也会增加。我希望div的最大尺寸保持在450px,然后如果数据增加,滚动将自动出现。不应增加div大小。jsfiddle样式:.itemconfiguration{min-height:440px;width:215px;/*background-color:#CCC;*/float:left;position:relative;margin-left:-5px;}.left_contentlist{width:215px;float:left;padding:0005px;pos

html - 如何在 CSS 中添加旋转图像?

我写了下面的代码。但是现在的要求是图片要旋转180度。我怎样才能做到这一点?#cell{background-image:url("../images/logo.PNG");background-attachment:fixed;background-repeat:no-repeat;background-position:0px250px;background-color:#FFFFFF;border-left:2px;}HTML标签: 最佳答案 一个跨浏览器的解决方案是#cell{-webkit-transform:rotate

html - 如何在 CSS 中添加旋转图像?

我写了下面的代码。但是现在的要求是图片要旋转180度。我怎样才能做到这一点?#cell{background-image:url("../images/logo.PNG");background-attachment:fixed;background-repeat:no-repeat;background-position:0px250px;background-color:#FFFFFF;border-left:2px;}HTML标签: 最佳答案 一个跨浏览器的解决方案是#cell{-webkit-transform:rotate

html - CSS 缩小图像以适应包含的 div,而不指定原始大小

我想要一个网站,我可以在其中上传不同大小的图像以在jqueryslider中显示。我似乎无法将图像放入包含的div中(按比例缩小)。这是我打算如何做的UntitledDocument和CSS#wrapper{width:400px;height:400px;border:2pxblacksolid;margin:auto;}#im{max-width:100%;}我尝试在CSS中将图像的最大宽度设置为100%。但这是行不通的。 最佳答案 您可以使用backgroundimage实现这一目标;来自MDN-BackgroundSize:

html - CSS 缩小图像以适应包含的 div,而不指定原始大小

我想要一个网站,我可以在其中上传不同大小的图像以在jqueryslider中显示。我似乎无法将图像放入包含的div中(按比例缩小)。这是我打算如何做的UntitledDocument和CSS#wrapper{width:400px;height:400px;border:2pxblacksolid;margin:auto;}#im{max-width:100%;}我尝试在CSS中将图像的最大宽度设置为100%。但这是行不通的。 最佳答案 您可以使用backgroundimage实现这一目标;来自MDN-BackgroundSize:

html - 显示一个宽度为 100% 的 div,带有边距

我想显示一个可展开的div(width:100%)...#page{background:red;float:left;width:100%;height:300px;}#margin{background:green;float:left;width:100%;height:300px;margin:10px;}"somecontenthere" 最佳答案 您可以使用calc()css函数(browsersupport)。#page{background:red;float:left;width:100%;height:300px

html - 显示一个宽度为 100% 的 div,带有边距

我想显示一个可展开的div(width:100%)...#page{background:red;float:left;width:100%;height:300px;}#margin{background:green;float:left;width:100%;height:300px;margin:10px;}"somecontenthere" 最佳答案 您可以使用calc()css函数(browsersupport)。#page{background:red;float:left;width:100%;height:300px

html - 如何在 bootstrap 中使用 css3 中的响应式背景图片

我不想使用html标签。这是我的CSS。我正在使用bootstrap3.0。background:url('images/ip-box.png')no-repeat;background-size:100%;height:140px;display:block;padding:0!important;margin:0;在100%缩放时这没问题。但是当我放大大约180%时,图像从顶部到底部都会变短,我需要一些css技巧。 最佳答案 对于完整的图像背景,检查这个:html{background:url(images/bg.jpg)no-

html - 如何在 bootstrap 中使用 css3 中的响应式背景图片

我不想使用html标签。这是我的CSS。我正在使用bootstrap3.0。background:url('images/ip-box.png')no-repeat;background-size:100%;height:140px;display:block;padding:0!important;margin:0;在100%缩放时这没问题。但是当我放大大约180%时,图像从顶部到底部都会变短,我需要一些css技巧。 最佳答案 对于完整的图像背景,检查这个:html{background:url(images/bg.jpg)no-

html - CSS:背景图像和填充

我想在列表项的右侧添加一个背景图像,并希望右侧也有一些填充,但我做不到。请看下面的例子:HTML:HelloHelloworldCSS:ul{width:100px;}ulli{border:1pxsolidorange;background:url("arrow1.gif")no-repeatcenterright;}ulli:hover{background:yellowurl("arrow1.gif")no-repeatcenterright;}我知道我们可以按像素设置图像位置,但由于每个li的宽度不同,我不能那样做。这是JSFiddle链接:http://jsfiddle.ne