Media chinhu
Zvinyorwa uye mienzaniso yeBootstrap's media media yekuvaka inodzokorora zvakanyanya senge blog blog, matweets, nezvimwe.
Muenzaniso
Chinhu chenhau chinobatsira kuvaka zvinhu zvakaoma uye zvinodzokororwa apo mamwe midhiya akaiswa padivi pezvinyorwa izvo zvisingaputire zvakataura midhiya. Uyezve, inoita izvi nemakirasi maviri chete anodiwa nekuda kweflexbox.
Pazasi pane muenzaniso wechinhu chimwe chete chenhau. Makirasi maviri chete anodiwa - kuputira .media
uye .media-body
kutenderedza zvirimo. Optional padding uye margin inogona kudzorwa kuburikidza ne spacing utilities .
Musoro wenhau
Uchandiitirawo saizvozvo here? Yave nguva yekutarisana nemimhanzi ini handichisiri yako nyuziyamu. Wanzwa kuti wakanaka, be the judge and my girls gonna take a vote. Ndinogona kunzwa phoenix mukati mangu. Denga rine godo nerudo rwedu, ngirozi dziri kuchema dziri kumusoro. Ehe, unondiendesa kune utopia.
<div class="media">
<img src="..." class="mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
<p>Will you do the same for me? It's time to face the music I'm no longer your muse. Heard it's beautiful, be the judge and my girls gonna take a vote. I can feel a phoenix inside of me. Heaven is jealous of our love, angels are crying from up above. Yeah, you take me to utopia.</p>
</div>
</div>
Flexbug #12: Inline zvinhu hazvibatwe sezvinhu zvinochinjika
Internet Explorer 10-11 haipe inline zvinhu senge zvinongedzo kana mifananidzo (kana ::before
uye ::after
pseudo-elements) sezvinhu zvinochinjika. Iyo chete workaround ndeye kuseta isiri-inline display
kukosha (semuenzaniso, block
, inline-block
, kana flex
). Isu tinokurudzira kushandisa .d-flex
, imwe yezvishandiso zvedu zvekuratidzira , sekugadzirisa kuri nyore.
Kunobva: Flexbugs paGitHub
Nesting
Midhiya zvinhu zvinogona kuvharirwa nekusingaperi, kunyangwe isu tichikurudzira kuti umire pane imwe nguva. Nzvimbo yakamira .media
mukati .media-body
mechinhu chevabereki media.
Musoro wenhau
Kumira pamberi apo mabhomba anotanga kudonha. Denga rine godo nerudo rwedu, ngirozi dziri kuchema dziri kumusoro. Haikwanise kukutsiva nemiriyoni mhete. Mukomana, kana uneni ndinokupa kuravira. Hapana kudzokera shure. Usati wasangana neni ndanga ndakanaka asi zvinhu zvairema. Unorema musoro wakapfeka korona.
Musoro wenhau
Kwaziwai vadikani ngatifambei. Hongu, tinochema ngirozi, ichinaya panyika kubva kumusoro. Kukupa chimwe chinhu chakanaka chokupemberera. Ndakambozviruma ruma rurimi ndichitura mafemo. Ndiri kuita kuti moyo wako umhanye mujean rangu rinosunga ganda. Pandinofamba ndega kune imwe beat. Zhizha tapedza chikoro patakatanga kusangana. Uri hypnotizing, ungave dhiyabhorosi here? Ungava ngirozi here? Yasvika nguva yekuburitsa mabharumu makuru. Ndakafunga kuti ndini ndaiva ndasiya. Bikinis, zucchini, Martinis, kwete weenies.
<div class="media">
<img src="..." class="mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
<p>Standing on the frontline when the bombs start to fall. Heaven is jealous of our love, angels are crying from up above. Can't replace you with a million rings. Boy, when you're with me I'll give you a taste. There’s no going back. Before you met me I was alright but things were kinda heavy. Heavy is the head that wears the crown.</p>
<div class="media mt-3">
<a class="mr-3" href="#">
<img src="..." alt="...">
</a>
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
<p>Greetings loved ones let's take a journey. Yes, we make angels cry, raining down on earth from up above. Give you something good to celebrate. I used to bite my tongue and hold my breath. I'm ma get your heart racing in my skin-tight jeans. As I march alone to a different beat. Summer after high school when we first met. You're so hypnotizing, could you be the devil? Could you be an angel? It's time to bring out the big balloons. Thought that I was the exception. Bikinis, zucchinis, Martinis, no weenies.</p>
</div>
</div>
</div>
</div>
Alignment
Midhiya muchinhu chemedia inogona kuenderana neflexbox utilities kumusoro (default), yepakati, kana kupera kwezviri mukati mako .media-body
.
Top-yakatarisana media
Ndichamuisa pakoma. Iwe unopa zana zvikonzero nei, uye iwe unoti uri kunyatso edza. Saka ndakagara ndakanyarara, ndikabvuma zvine ruremekedzo. Kukodzera hondo yangu yekorona. Uye paBirthday rangu rechi18 takawana ma tatoo anoenderana. Saka très chic, hongu, ari classic. Ndagadzirira mugwagwa usingafambwe.
Ndiri kufamba pamhepo (nhasi manheru). Asi pasi pasi. Iwe uri wepakutanga, haugone kutsiviwa. Asi mune humwe hupenyu ndinenge ndiri musikana wako. Takaenda kuCali ndokunodhakwa pamahombekombe. Tinogona kutamba, kusvika tafa, iwe neni, tichava vaduku nekusingaperi. Ndakuonai mudhorobha muchiimba maBlues.
<div class="media">
<img src="..." class="align-self-start mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0">Top-aligned media</h5>
<p>I’m gon’ put her in a coma. You give a hundred reasons why, and you say you're really gonna try. So I sat quietly, agreed politely. Suiting up for my crowning battle. And on my 18th Birthday we got matching tattoos. So très chic, yeah, she's a classic. I am ready for the road less traveled.</p>
<p>I'm walking on air (tonight). But down to earth. You're original, cannot be replaced. But in another life I would be your girl. We drove to Cali and got drunk on the beach. We can dance, until we die, you and I, will be young forever. Saw you downtown singing the Blues.</p>
</div>
</div>
Midhiya yakatarisana nepakati
Achatonhora sefiriji. Kumagumo ezvese. Kuruma senyuchi ndakawana mavanga angu. Bikinis, zucchini, Martinis, kwete weenies. Ndinovimba une hutano hwekudya. Tinogona kutamba, kusvika tafa, iwe neni, tichava vaduku nekusingaperi. Tiri kurarama hupenyu. Tiri kuzviita nemazvo. Shoko mumugwagwa, une chimwe chinhu chekundiratidza, ini.
Unoda kuona iyo show mu 3D, bhaisikopo. Vanoti, itya iwe hauna kufanana nevamwe, mudiwa wemangwana. Zarura mwoyo wako. Saka ndakagara ndakanyarara, ndikabvuma zvine ruremekedzo. Manheru eChishanu chapfuura. Ehe, une rombo rakanaka kana uri mundege yake. Ndichava chipo chako, ndikupe chimwe chinhu chakanaka chokupemberera.
<div class="media">
<img src="..." class="align-self-center mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0">Center-aligned media</h5>
<p>She'll turn cold as a freezer. At the eh-end of it all. Stinging like a bee I earned my stripes. Bikinis, zucchinis, Martinis, no weenies. I hope you got a healthy appetite. We can dance, until we die, you and I, will be young forever. We're living the life. We're doing it right. Word on the street, you got somethin' to show me, me.</p>
<p class="mb-0">Wanna see the show in 3D, a movie. They say, be afraid you're not like the others, futuristic lover. Open up your heart. So I sat quietly, agreed politely. Last Friday night. Yeah, you're lucky if you're on her plane. I'll be your gift, give you something good to celebrate.</p>
</div>
</div>
Nhepfenyuro yepasi-yakatarisana
Huya, mavara ako ngaapamuke. Ndiri kunzwa chiedza chiri mukati mangu ichi. Husiku hwese vari kutamba, rwiyo rwenyu. Kubva kuTokyo kuenda kuMexico, kuRio. Hapana kudzokera shure. Asi pasi pasi. Zvemashiripiti, zvine mavara, VaChakavanzika, ee. DNA yakasiyana, havakunzwisise.
Asi pasi pasi. Ane izvozvo, je ne sais quoi, unozviziva. Ndiri kuona zvakanyorwa pamadziro. Vakomana vanotyoka mitsipa try'na kuti vanyanye kunyangira. Nditore, ta-ta-nditore. Zarura mwoyo wako. Ndakafunga kuti ndini ndaiva ndasiya. Boom, boom, boom. Venice beach nePalm Springs, nguva yezhizha ndiyo zvose. Dzosa kurohwa. (Ndizvo zvatinoita)
<div class="media">
<img src="..." class="align-self-end mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0">Bottom-aligned media</h5>
<p>Come on, let your colours burst. I can feel this light that's inside of me. All night they're playing, your song. From Tokyo to Mexico, to Rio. There’s no going back. But down to earth. Magical, colorful, Mr. Mystery, ee. Different DNA, they don't understand you.</p>
<p class="mb-0">But down to earth. She's got that, je ne sais quoi, you know it. I can see the writing on the wall. The boys break their necks try'na to creep a little sneak peek. Take me, ta-ta-take me. Open up your heart. Thought that I was the exception. Boom, boom, boom. Venice beach and Palm Springs, summertime is everything. Bring the beat back. (This is how we do)</p>
</div>
</div>
Order
Shandura kurongeka kwemukati mune midhiya zvinhu nekugadzirisa iyo HTML pachayo, kana nekuwedzera imwe tsika flexbox CSS kuseta iyo order
pfuma (kune nhamba yesarudzo yako).
Media chinhu
Ndinoziva kuti pachava nechibairo asi ndiwo mutengo wacho. Wakashinga here kuti ndione peacock yako? Iva chiroto chako chekuyaruka manheru ano. Uh-huh, ndiri kukuona. Hapana kudzokera shure. Ehe, takawedzera makadhi edu echikwereti uye tikadzingwa mubhawa. Saka rega ndikutore musutu yako yekuzvarwa. Unogona kupinda murudo paunosangana naye. Nyika yakanga iri muchanza chemaoko ako. Usarega hukuru huchikuwisira pasi, o, oh hongu. Iye zvino tave kutaura nezvekuongorora nyeredzi, kuita nzara dzedu, zvese zvechiJapan-y. Ndiite Aphrodite wako.
<div class="media">
<div class="media-body">
<h5 class="mt-0 mb-1">Media object</h5>
<p>I know there will be sacrifice but that's the price. Are you brave enough to let me see your peacock? Be your teenage dream tonight. Uh-huh, I see you. There’s no going back. Yeah, we maxed our credit cards and got kicked out of the bar. So let me get you in your birthday suit. You may fall in love when you meet her. Had the world in the palm of your hands. Don't let the greatness get you down, oh, oh yeah. Now we talking astrology, getting our nails did, all Japanese-y. Make me your Aphrodite.</p>
</div>
<img src="..." class="ml-3" alt="...">
</div>
Media list
Nekuti iyo midhiya chinhu chine zvishoma zvimiro zvinodiwa, unogona zvakare kushandisa aya makirasi pane zvinyorwa zveHTML zvinhu. Pane yako <ul>
kana <ol>
, wedzera iyo .list-unstyled
kubvisa chero browser default list masitaera, wobva waisa .media
kune yako <li>
s. Senguva dzose, shandisa zvigadziro zvepakati pese pazvinenge zvichidiwa kuridza zvakanaka.
-
List-based media object
Vasikana vangu vese vintage Chanel mwana. Saka unogona kutora keke rako. Manheru ano, manheru ano, manheru ano, ndiri kufamba pamhepo. Zvishoma nezvishoma ndichimedza kutya kwangu, hongu hongu. Kukura nekukurumidza kuita mheni. Kupisa nekurema, 'Kusvika kwayedza. Ngano iya inopera nenyanzvi yakapfeka nhumbi dzokurwa nadzo. Unorema musoro wakapfeka korona.
-
List-based media object
Zvichida chikonzero nei mikova yose yakavharwa. Nokuti kana wava wangu, kana wava wangu. Iva chiroto chako chekuyaruka manheru ano. Unorema musoro wakapfeka korona. Haisi kana zororo, hapana chekupemberera. Dutu rakakwana, dutu rakakwana.
-
List-based media object
Wakashinga here kuti ndione peacock yako? Hapana kudzokera shure. Ino ndiyo nguva yekupedzisira iwe uchiti, mushure memutsara wekupedzisira iwe unotyora. Kumagumo ezvese.
<ul class="list-unstyled">
<li class="media">
<img src="..." class="mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0 mb-1">List-based media object</h5>
<p>All my girls vintage Chanel baby. So you can have your cake. Tonight, tonight, tonight, I'm walking on air. Slowly swallowing down my fear, yeah yeah. Growing fast into a bolt of lightning. So hot and heavy, 'Til dawn. That fairy tale ending with a knight in shining armor. Heavy is the head that wears the crown.</p>
</div>
</li>
<li class="media my-4">
<img src="..." class="mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0 mb-1">List-based media object</h5>
<p>Maybe a reason why all the doors are closed. Cause once you’re mine, once you’re mine. Be your teenage dream tonight. Heavy is the head that wears the crown. It's not even a holiday, nothing to celebrate. A perfect storm, perfect storm.</p>
</div>
</li>
<li class="media">
<img src="..." class="mr-3" alt="...">
<div class="media-body">
<h5 class="mt-0 mb-1">List-based media object</h5>
<p>Are you brave enough to let me see your peacock? There’s no going back. This is the last time you say, after the last line you break. At the eh-end of it all.</p>
</div>
</li>
</ul>