English 中文(简体)
能否在四舍五入结束时删除案文?
原标题:Can i fade text out at the end of a div?
  • 时间:2011-08-15 18:37:42
  •  标签:
  • jquery
  • css

在不使用图像的情况下,如何把文字放在一片背景形象的顶端?

我知道有人将来到这里,并告诉我,为什么我应该使用一种形象,但不能这样做?

任何建议都将受到高度赞赏。

最佳回答

你们必须把四分五裂与另一个元素(最好是伪装)相隔,并且有背景梯度,与你的亲子相匹配。

假设你的背景是黑色的,你会这样做:

div {
    position: relative;
}
div:before {
    background: -webkit-linear-gradient(top, rgba(0, 0, 0, 1) 5%, rgba(0, 0, 0, 0) 100%);
    content:   ;
    position: absolute;
    width: 100%;
    height: 50px;
}

http://jsfiddle.net/SFYrg/“rel=“nofollow” http://jsfiddle.net/SFYrg/

你显然必须增加所有供应商的预设条件。

问题回答
  $("myElement").fadeOut("slow");

将案文装入某种集装箱,并用 j子 out。 你们不需要任何图像。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签