Questions tagged «css»

CSS(层叠样式表)是一种表示样式表语言,用于描述HTML(超文本标记语言),XML(可扩展标记语言)文档和SVG元素的外观和格式,包括(但不限于)颜色,布局,字体,和动画。它还描述了如何在屏幕,纸张,语音或其他媒体上呈现元素。

5
卸下IE10选择元素箭头
因此,对于Mozilla和WebKit,我有一个不错的解决方案,select使用appearance: none;并具有一个父元素替换了框中的箭头。 在IE中,大多数情况下我禁用了此功能。对于IE10,我的条件注释实际上不起作用,因此我实际上不能将其禁用。 这是我的标记: <!--[if lt IE 7 ]> <html class="ie6"> <![endif]--> <!--[if IE 7 ]> <html class="ie7"> <![endif]--> <!--[if IE 8 ]> <html class="ie8"> <![endif]--> <!--[if IE 9 ]> <html class="ie9"> <![endif]--> <!--[if (gt IE 9)]> <html class="ie10plus"> <![endif]--> <!--[if !(IE)]><!--> <html> <!--<![endif]--> 该类ie10plus实际上并没有使其成为标记。 我也觉得可能有一种合法的方法来替换IE中的箭头。我不反对实际解决问题。appearance: none;但是不起作用。那我该怎么办?


15
如何启用模式内的内容滚动?
我正在尝试将大量文本放入使用Twitter Bootstrap创建的模式框中,但是我遇到了一个问题:该内容拒绝滚动。 我尝试添加overflow:scroll和overflow-y:scroll,但无济于事;只会导致它显示滚动条,而没有实际启用滚动。 其背后的原因是什么,我该怎么办?


7
使用Twitter Bootstrap将页脚固定在页面底部
我有一些网页内容不多,页脚位于页面中间,但我希望它位于页面底部。 我已将所有页面放在“持有人”中 #holder { min-height: 100%; position:relative; } 然后在我的页脚中使用以下CSS ul.footer { margin-top: 10px; text-align: center; } ul.footer li { color: #333; display: inline-block; } #footer { bottom: -50px; height: 50px; left: 0; position: absolute; right: 0; } 我的页脚的html <div class="container"> <div class="row"> <div class="span12"> <div id="footer"> <ul class="footer"> <li>Website built …

3
如何计算所需的色相旋转以生成特定的颜色?
我有一张白色图片,正在用作div的背景,并且我想进行着色以匹配主题的主色。我知道我可以做到: filter: sepia() saturate(10000%) hue-rotate(30deg); 并循环hue-rotate查找颜色,但是可以预先计算出该值吗?鉴于指定的十六进制值非常暗,我想我也需要包括invert(%)过滤器。 给定十六进制值,#689d94我需要执行什么数学运算来计算期望值hue-rotate和invert将我的白色背景图像转换为相同颜色的值? 编辑 这是div带有绿色过滤的白色背景图像的a的代码段。这里的窍门div是,被过滤的是整个对象,而不仅仅是图像。如果要div在文本中输入一些文本,则文本颜色也会变为绿色。 div { background:url(http://richard.parnaby-king.co.uk/basket.svg) no-repeat scroll 0 0 transparent; background-size:5em; width:5em; height:5em; -webkit-filter: invert(25%) sepia() saturate(100000%) hue-rotate(174deg); filter: invert(25%) sepia() saturate(100000%) hue-rotate(174deg); } <div> </div> 运行代码段隐藏结果展开摘要
75 css  css-filters 

5
基本CSS-如何在顶部用半透明DIV覆盖DIV
我正在努力在我的浏览器(Chrome)中进行渲染。我有一个包装器,其中包含HTML的所有元素,并且我想有一个DIV(将其称为div-1)来保存图像,并在其顶部的左上角有一个div覆盖层,就像我在其中绘制的那样图片...任何快速解决方案?
75 css  html 

8
用inline-block换行吗?
我想删除<br />并通过CSS进行换行。如果我将跨度更改为display:block宽度,则宽度将为100%,并且我需要宽度像现在一样准确地是文本的长度。有什么建议? <div class="fullscreen"> <p class="text"> <span class="medium">We</span> <br /> <span class="large">build</span> <br /> <span class="medium">the</span> <br /> <span class="large">Internet</span> </p> </div> .text span { background:rgba(165, 220, 79, 0.8); display:inline-block; padding:7px 10px; color:white; } .fullscreen .large { font-size:80px } 混蛋
75 css 

4
从文本区域删除所有样式(边框,发光)
我想从文本区域中删除样式,如果可能的话,将其全部留白,没有任何边框或辉光。我尝试了在SO上找到的其他内容,但没有任何效果(尝试使用FF和Chrome)。 那么,有可能吗? 到目前为止,我已经尝试过: textarea#story { // other stuff -moz-appearance:none; outline:0px none transparent; } textarea:focus, input:focus{ outline: 0; } *:focus { outline: 0; }
75 css  forms  textarea  border 


4
Flexbox布局中的填充底部/顶部
我有一个Flexbox布局,其中包含两个项目。其中之一使用padding-bottom: 显示代码段 #flexBox { border: 1px solid red; width: 50%; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; } #text { border: 1px solid green; padding: .5em; } #padding { margin: 1em 0; border: 1px solid blue; padding-bottom: 56.25%; /* intrinsic aspect ratio */ height: 0; } <div id='flexBox'> …

6
修复了Mobile Safari(iPhone)上的字体大小问题,该问题导致文本呈现不一致并且某些字体大于其他字体?
我们的网站在移动Safari上呈现的字体大小不一致-据我们所知,只有移动Safari。这非常困扰我们。 我们使用Firebug分析了该网站,发现错误的区域继承了正确的样式,但是字体仍然以错误的大小呈现。 1)访问http://www.panabee.com。 2)搜索域名。 左侧的框显示不正确的字体大小。字体大小应与右侧的字体大小(框标题和框副本)匹配。例如,标题“ Variations”和“ Twitter”比标题“ Alternate Endings”大得多。 有什么线索吗?

2
CSS旋转地球仪
我正在CSS中创建旋转的地球效果。我在CSS中创建了Globe: body { background-color: #111; } #earth { width: 300px; height: 300px; background: url(https://web.archive.org/web/20150807125159if_/http://www.noirextreme.com/digital/Earth-Color4096.jpg); border-radius: 50%; background-size: 610px; box-shadow: inset 8px 36px 80px 36px rgb(0, 0, 0), inset -6px 0 12px 4px rgba(255, 255, 255, 0.3); animation-name: rotate; animation-duration: 12s; animation-iteration-count: infinite; animation-timing-function: linear; -webkit-animation-name: rotate; -webkit-animation-duration: 12s; -webkit-animation-iteration-count: infinite; …

8
如何在不使用float的情况下将div左右对齐?
当做这样的事情: <div style="float: left;">Left Div</div> <div style="float: right;">Right Div</div> 我必须使用一个空的div clear: both; 对我来说很脏 因此,有没有一种方法可以不使用浮点数进行对齐? 这是我的代码: .action_buttons_header a.green_button{ } <div class="change_requests_container" style="width:950px !important"> <div class="sidebar"> <a href="/view/preview_unpublished_revision/422?klass=Proposal" class="preview sidebar_button_large action_button" name="preview" onclick="window.open(this.href);return false;">Preview New Version</a> </div> <div class="content_container"> <div class="content"> <div class="action_buttons_header"> <a href="/changes/merge_changes/422" class="re_publish publish green_button" style=" margin: 5px 0px …
75 html  css 

5
如何将flex容器设置为其flex-items的宽度?
我有一个Flex容器justify-content: flex-start。由于弹性项目占用的空间少于容器的大小,因此最终会在右侧溢出。 除了在flex容器上设置显式宽度外,还有没有其他方法可以等效width: auto地消除溢出?
75 css  flexbox 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.