Jump to content
  • 0

Позиционирование


ote4ek
 Share

Question

Всем привет!

Друзья,помогите понять,для чего/зачем и когда нужно применять position,читаю книжки/самоучители,токо я чё то допереть никак не могу,кому не трудно,расскажите по подробнее о позиционирование,если можно с примерами,мб есть статьи какие,на русском,где,как говорится,всё расжёванно...

Хелп!)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

<div class="relative">
<div class="absolute">111222</div>
</div>

.relative {position: relative; top: 20px; width: 200px; height: 200px; background: black} /* position: relative можно двигать, например на 20px вниз с того места, где он должен был прорисоваться */
.absolute {position: absolute; bottom: 0; right: 0; width: 100px; height: 100px; background: white} /* position: absolute можно расположить внутри блока с position: relative и бвигать относительно его, в данном случае внутренний блок будет располагаться в правом нижнем углу внешнего блока */

это только некоторые примеры, Вам необходимо понять принцип действия свойства position, а для этого почитайте: http://htmlbook.ru/css/position.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy