标签: stylesheet

使用样式属性不赞成?

作为一个开始从基于表格的设计过渡到完整CSS的人我想知道是否使用style属性来调整元素被认为是"作弊",如果绝对所有的演示应该严格地在样式表中?

也可以看看:

风格问题 - 样式和样式表的方法

html css stylesheet

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

css div居中

我试图将div按钮居中,但它不起作用

这是css

    .game-actions{
margin-left:auto;
margin-right:auto;
}

.game-actions a.up {
    display: block;
    text-decoration: none;
    font-weight: bold;
    padding:12px 32px;
    float: left;
    border: 1px solid #c1d9f6;
    -moz-border-radius: 7px;
    -webkit-border-radius: 7px; 
}

.game-actions a:hover {
    border-color: #80b0ea;
    background:#e1ecf3;
}
Run Code Online (Sandbox Code Playgroud)

这是html

<div class="game-actions"> 
<a class="up" id="a1" href="#" onClick="toggle(this.value)">Tweet it</a>
</div>
Run Code Online (Sandbox Code Playgroud)

网站位于 - http://gibberize.com/

html css stylesheet

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

在IE中阻止文本输入扩展

我在IE中输入字段有问题.代码用于portlet,宽度需要是动态的,因为用户可以将portlet放在页面中具有不同宽度的三列中的任何一列上.一如既往,它在FF中工作正常但在IE中却不行.为了使宽度dyanaic我设置宽度="100%".填充文本输入的数据来自DB.当呈现页面时,如果存在长URL,则文本输入扩展以填充IE中的内容,但是在FF中它仅保持相同的宽度(即它所存在的TD的100%).如何阻止IE更改宽度以适应内容.将宽度设置为100px的固定宽度可以解决问题,但我需要将宽度设置为百分比,以便适应portlet在页面上放置的位置.

我尝试过overflow:hidden和自动换行:break-word但是我无法工作.这是我的输入代码和样式表

<td class="right" >
    <input type="text" class="validate[custom[url]]" value="" id="linkText" name="communicationLink"  maxlength="500" maxsize="100" />
</td>

    .ofCommunicationsAdmin input {
    font-family: "Trebuchet MS";
    font-size: 11px;
    font-weight:normal;
    color:#333333;
    overflow:hidden;
    }



   .ofCommunicationsAdmin #linkText { 
    overflow:hidden; 
    width:100%; 
    border:1px 
    #cccccc solid; 
    background:#F4F7ED 
    top repeat-x;
    }

.ofCommunicationsAdmin td.right {
   vertical-align: top;   
   text-align: left;   
}
Run Code Online (Sandbox Code Playgroud)

html css forms internet-explorer stylesheet

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

重置Qt样式表

我设法将我的QLineEdit设置为这样的样式:

替代文字http://www.kimag.es/share/54278758.png

void Utilities::setFormErrorStyle(QLineEdit *lineEdit)
{
    lineEdit->setStyleSheet(
            "background-color: #FF8A8A;"
            "background-image: url(:/resources/warning.png);"
            "background-position: right center;"
            "background-repeat: no-repeat;"
            "");
}
Run Code Online (Sandbox Code Playgroud)

我用这个函数调用了

Utilities *util = new Utilities;
util->setFormErrorStyle(lineNoStaf);
Run Code Online (Sandbox Code Playgroud)

流程应该是这样的:

  1. 用户打开表单
  2. 用户填写数据
  3. 用户提交数据
  4. 得到了错误
  5. 使用 setFormErrorStyle()
  6. 用户编辑QLineEdit中的文本,样式消失

此功能应该可以一遍又一遍地重复使用,但是如何将QLineEdit信号连接textChanged()到其他类中的功能,该功能将重置样式表,然后断开信号,使其在每次文本更改时都不会连续运行?

qt stylesheet signals-slots

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

在div中定位固定图像(地图上的图钉)

我有一个带有css规则的"map"div height: 400px; width: 800px; background: url(map.png).该div具有世界地图的背景图像.我有一些图像作为"引脚",我想在特定区域放置在地图上.我将赋予图像哪些CSS属性,例如,通过"map"div的特定顶部/左侧像素坐标将它们放置在"map"div中?我可以将它们相对于整个身体定位,但不能定位到特定的div.

html css xhtml stylesheet

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

填充和边距有什么区别?

填充和边距有什么区别?

两者都做同样的事情。

stylesheet

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

Less - 动态样式表语言?

虽然谷歌用更少的写作来搜索更多的CSS,但我发现了这一点 - http://lesscss.org/

有没有人试过它,它是否在IE6 +,Firefox 3 +,Chrome,Safari,Opera以及我们所有使用的所有标准网络浏览器下工作?

提前致谢 :)

css dynamic stylesheet

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

IE8/IE9不加载CSS

在这个网站http://gaeilge2013.ie/一些样式表没有在IE9中加载.在Chrome/Firefox/Opera/Safari中,一切都很好.很奇怪.

这是不适用的css:

<link rel='stylesheet' id='dzs.timelineslider-css' href='http://gaeilge2013.ie/wp-content/plugins/dzs-timelineslider/timelineslider/timelineslider.css?ver=3.5.1' type='text/css' media='all' />

链接很好....

谢谢!

css internet-explorer stylesheet

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

当按下usint样式表时,pyqt改变按钮的颜色

我正在尝试在按下时更改按钮的颜色,看起来可以直接在样式表中完成,然后执行功能然后连接它.

http://qt.developpez.com/doc/4.7-snapshot/stylesheet-examples/中 显示此示例:

QPushButton#evilButton {
    background-color: red;
    border-style: outset;
    border-width: 2px;
    border-radius: 10px;
    border-color: beige;
    font: bold 14px;
    min-width: 10em;
    padding: 6px;
}
QPushButton#evilButton:pressed {
    background-color: rgb(224, 0, 0);
    border-style: inset;
}
Run Code Online (Sandbox Code Playgroud)

怎么能把它翻译成python pyqt?

pyqt colors button stylesheet

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

CSS类的范围

<style>
.bgClr{
background-color: lightgreen;
}
</style>

<link href=@Url.Content("~/Content/css/xyz.css") rel="stylesheet" />
<div>......
<input type="text" class="bgClr" />
....</div>
Run Code Online (Sandbox Code Playgroud)

这是我在html页面中编写的代码.在xyz.css中,我已经定义了相同的css类

.bgClr{
background-color: red;
} // in xyz.css
Run Code Online (Sandbox Code Playgroud)

但结果是,控件的背景颜色始终为红色.

我可以知道为什么总是采用xyz.css的.bgClr吗?

html css stylesheet

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

标签 统计

stylesheet ×10

css ×7

html ×5

internet-explorer ×2

button ×1

colors ×1

dynamic ×1

forms ×1

pyqt ×1

qt ×1

signals-slots ×1

xhtml ×1