Консультация № 85163
02.05.2007, 22:59
0.00 руб.
0 2 2
Помагите реализовать такое (средствами CSS):
имеется таблица, в ней ячейка произвольной ширины и высоты (могут изменяться), нужно: в каждый угол именно этой ячейки рисунок (рисунок например в форме триугольничка "резного")

Вот такой незатейливый вопросик :)

И жедательно чтобы эти рисунки как бы были на заднем фоне и не мешали разместить любую другую информацию в этой ячейке.

Обсуждение

Неизвестный
03.05.2007, 11:46
общий
это ответ
Здравствуйте, Akylenok!
Да уж незатейливый! :)

Сдаётся мне, что чисто средствами CSS не получится сделать такую вещь.
Но можно сделать через одно место, как это показано в приложении. Код выглядит ужасно, но вроде работает. В кратце поясню. Помещаем четыре слоя друг на друга. каждый слой содержит картинку в соответствующем углу. поверх всего этого помещаем слой, где будет текст и всё остальное, что должно быть в ячейке.

Удачи.

Приложение:
<html><head> <title>Background</title> <style type="text/css"> .bglt, .bgrt, .bglb, .bgrb { background-image: url("new.gif"); background-repeat: no-repeat; width: 100%; height: 100%; left: 0px; position: relative; } .bglt { background-position: left top; top: 1px; z-index: 10; } .bgrt { background-position: right top; top: -99%; z-index: 10; } .bglb { background-position: left bottom; top: -200%; z-index: 10; } .bgrb { background-position: right bottom; top: -300%; z-index: 10; } .text { position: relative; top: -400%; left: 0px; z-index: 100; } </style></head><body><table cellpadding="0" cellspacing="0" width="70%" border="1"> <tr height="100px"> <td> <!--Эти четыре тэга нужны для прорисовки фона в углах--> <div class="bglt"></div> <div class="bgrt"></div> <div class="bglb"></div> <div class="bgrb"></div> <!--здесь находится непосредственно содержимое ячейки--> <div class="text"> Fourier was born at Auxerre in the Yonne departement of France, the son of a tailor. He was orphaned at age eight. Fourier was recommended to the Bishop of Auxerre, and through this introduction, he was educated by the Benvenistes of the Convent of St. Mark. The commissions in the scientific corps of the army were reserved for those of good birth, and being thus ineligible, he accepted a military lectureship on mathematics. <div> </td> <td> Fourier recognized that Earth primarily gets energy from Solar radiation, to which the atmosphere is transparent, and that geothermal heat doesn‘t contribute much to the energy balance. However, he mistakenly believed that there is a significant contribution of radiation from interplanetary space. </td> </tr></table></body></html>
Неизвестный
04.05.2007, 09:34
общий
это ответ
Здравствуйте, Akylenok!

Вот чем метод не по душе ???
<table border=1 width=100 height=100>
<tbody>
<tr>
<td background="point.gif" style="background-repeat: no-repeat; background-position: top left">111111
1111
<td background="point.gif" style="background-repeat: no-repeat; background-position: top right">33333
33333
<tr><td background="point.gif" style="background-repeat: no-repeat; background-position: bottom left">2222
222222
<td background="point.gif" style="background-repeat: no-repeat; background-position: bottom right">44444
444444
</tbody>
</table>
Форма ответа