Website, Webmaster, Webdeveloper
Home > LOEKELOE > COMPUTER STUFF > Website, Webmaster, Webdeveloper > Bermain dengan teknologi HTML5: Part 3 (CSS3)
Total Views: 1779 Share : Facebook ShareFacebook Twitter ShareTwitter Google+ ShareGoogle+
Page 2 of 4 |  < 1 2 3 4 > 

gigcarnation - 05/09/2012 04:36 PM
#21

Quote:
Original Posted By sealgreat
ane punya problem pake CSS3 di IE8 kebawah, terutama untuk border radius & shadow..... bingung
Apa ada yg punya solusinya.... :sorry


emang IE gitu D
tapi kalo gak salah bisa pakai properti filter kok

Quote:
Original Posted By Musicrebirth
Sore suhu.. newbie numpang nyimak..

btw dah masuk css3 y.. ane rekap dlu dah dari part 1.. hehehe..

nampaknya prospek kedepannya cerah neh HTML5 ama css3.. apa bner bs jalan di IOS..?


ok gan D
emang nih, HTML5 dan CSS3 lagi tren D
untuk jalan di IOS kalo gak salah bisa D

Quote:
Original Posted By arviza
ijin bookmark dulu ya


ok D

Quote:
Original Posted By S4nJi

Cheatsheet CSS3 :
Either Artikel W3C ato MDN D


ane gak tau gan

Quote:
Original Posted By gest

emang napa part 2 om? D


sebagian isi part 2 lenyap takut
baru ane gak punya backupnya lagi

Quote:
Original Posted By fachrils

1.Boder Radius
2.Box Shadow
3.Scroll bar

________________________________________

1.border radius

[HTML]

-webkit-border-radius:5px;
-moz-border-radius:5px;
-o-border-radius:5px;
-ms-border-radius:5px;
border-radius:5px;

[/HTML]
2. Box shadow

[HTML]

-webkit-box-shadow: 0px 0px 0px 10px #ddd;
-moz-box-shadow: 0px 0px 0px 10px #ddd;
-o-box-shadow: 0px 0px 0px 10px #ddd;
-ms-box-shadow: 0px 0px 0px 10px #ddd;
box-shadow: 0px 0px 0px 10px #ddd;

#ddd bisa diganti kalo mau efek transparant pake rbg collor
rgba(111, 111, 111, 0.57) seterah sesuai selera D
di inspect elment google chrome versi 20 ada kok color picker nya
[/HTML]

3. Scrollbar ( Just for GoogleChrome )

[HTML]
/* scroller browser */
::-webkit-scrollbar {
width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
-webkit-border-radius: 10px;
border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
background: #a6a5a5;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(0,0,0,0.4);
}

[/HTML]

maap kalo jelek karya nubi shakehand


thanks tambahannya D

Quote:
Original Posted By blukeciprak
Gan nubi mo tanya niho, klo mo bikin background Footer/header full kekanan & kekiri kaya kaskus beta gimana ye gan? nih gan maksud ane percis kaya footer kaskus beta yg warna hitam sedangkan background body warnay biru???
minta tutor CSS yang mirip kayak gitu dong gan klo ada, ntar ane cendolin deh cendols
Spoiler for contoh

Bermain dengan teknologi HTML5: Part 3 (CSS3)


maksdunya full gitu?
kalo ente pake properti background-color sih otomatis full
tapi kalo backgroundnya gambar ada caranya D
pertama ente nulis sintaksnya kayak biasa lalu tambahin ini:

[HTML]
-webkit-background-size:cover cover;
-moz-background-size:cover cover;
-o-background-size:cover cover;
-ms-background-size:cover cover;
background-size:cover cover;
[/HTML]

contoh penggunaan:
[HTML]
body {
background-image:url(bg.jpg);
-webkit-background-size:cover cover;
-moz-background-size:cover cover;
-o-background-size:cover cover;
-ms-background-size:cover cover;
background-size:cover cover;
}
[/HTML]

intinya tinggal gunakan properti background-size D
Musicrebirth - 05/09/2012 06:53 PM
#22

Quote:
Original Posted By gigcarnation
emang IE gitu D
tapi kalo gak salah bisa pakai properti filter kok



ok gan D
emang nih, HTML5 dan CSS3 lagi tren D
untuk jalan di IOS kalo gak salah bisa D



ok D



ane gak tau gan



sebagian isi part 2 lenyap takut
baru ane gak punya backupnya lagi



thanks tambahannya D



maksdunya full gitu?
kalo ente pake properti background-color sih otomatis full
tapi kalo backgroundnya gambar ada caranya D
pertama ente nulis sintaksnya kayak biasa lalu tambahin ini:

[HTML]
-webkit-background-size:cover cover;
-moz-background-size:cover cover;
-o-background-size:cover cover;
-ms-background-size:cover cover;
background-size:cover cover;
[/HTML]

contoh penggunaan:
[HTML]
body {
background-image:url(bg.jpg);
-webkit-background-size:cover cover;
-moz-background-size:cover cover;
-o-background-size:cover cover;
-ms-background-size:cover cover;
background-size:cover cover;
}
[/HTML]

intinya tinggal gunakan properti background-size D



oh y gan mw tanya.. secara keseluruhan bedanya css3 dan html5 itu apa y..? dari versi sblmnya maksud saya mungkin dari extensinya kah.. ato apanya.. sehingga bs disebut HTML5 dan CSS3..
gigcarnation - 05/09/2012 07:52 PM
#23

Quote:
Original Posted By Musicrebirth



oh y gan mw tanya.. secara keseluruhan bedanya css3 dan html5 itu apa y..? dari versi sblmnya maksud saya mungkin dari extensinya kah.. ato apanya.. sehingga bs disebut HTML5 dan CSS3..


HTML5 adalah pengembangan dari HTML4
CSS3 pun begitu D pengemabngan dari CSS2
S4nJi - 05/09/2012 08:03 PM
#24

Quote:
Original Posted By gigcarnation
HTML5 adalah pengembangan dari HTML4
CSS3 pun begitu D pengemabngan dari CSS2


HTML5 Enhances semanticness of HTML4
CSS3 memperluas kemampuan CSS2, secara CSS2 masih baru dan masih bisa dikembangkan D

Anyways, CSS3 itu kalo mau ditulis di pejwan ya semua dong, dengan judul bukan "Cara mengganti scrollbar" or something, tapi ke arah selectornya langsung
Selector biasa juga jangan dilupain

Selector macam ini cuma CSS3 loh
[code]
div.wrapper > parent long.child > direct#child ~ preceded.child + immediately.preceded#child:not(.bukanclassini):first-child > .element[style*='color: red']:nth-child(odd) {
background: black; }
[/code]
Itu fully legal and working CSS3 selector D
So much could be explained from it p

Yang mau info latest tentang css3 or so, buka artikel W3C sering sering, di w3.org p
Ato alternatifnya, MDN, Mozilla Developer Network, aktif banget, fitur experimental langsung ada disitu p
gest - 05/09/2012 08:55 PM
#25

mumpung ngomongin html5 dan css3..
btw, ada yang pernah pakai unicode character di id attributes? seperti id="♥☺☃"
katanya bisa langsung dipakai di css selector, seperti ini:
[CODE]
#♥☺☃ {
background: hotpink;
}
[/CODE]
Musicrebirth - 05/09/2012 08:59 PM
#26

Quote:
Original Posted By gigcarnation
HTML5 adalah pengembangan dari HTML4
CSS3 pun begitu D pengemabngan dari CSS2


tapi kliatannya skrng lagi populer banget y gan..? ampe" lagi itu ane mw magang prepare ke html5 ama css3

nah syarat jika sebuah template html itu bs dibilang HTML5 itu musti ada ini y..?

[HTML][/HTML]
[HTML][/HTML]
[HTML][/HTML]

Quote:
Original Posted By gest
mumpung ngomongin html5 dan css3..
btw, ada yang pernah pakai unicode character di id attributes? seperti id="♥☺☃"
katanya bisa langsung dipakai di css selector, seperti ini:
[CODE]
#♥☺☃ {
background: hotpink;
}
[/CODE]


Unicodenya apa tuh gan..? minta unicodenya donk biar kaya lambang gitu..
blukeciprak - 05/09/2012 09:12 PM
#27

Quote:
Original Posted By blukeciprak
Gan nubi mo tanya niho, klo mo bikin background Footer/header full kekanan & kekiri kaya kaskus beta gimana ye gan? nih gan maksud ane percis kaya footer kaskus beta yg warna hitam sedangkan background body warnay biru???
minta tutor CSS yang mirip kayak gitu dong gan klo ada, ntar ane cendolin deh cendols
Spoiler for contoh

Bermain dengan teknologi HTML5: Part 3 (CSS3)


yang nih dong gan, ntar ane cendolin deho
S4nJi - 05/09/2012 09:21 PM
#28

Quote:
Original Posted By blukeciprak
yang nih dong gan, ntar ane cendolin deho


[code]
#footer {
position: absolute;
width: 100%;
}
[/code]

hammer:
gest - 05/09/2012 09:37 PM
#29

Quote:
Original Posted By S4nJi

[CODE]#footer {
position: absolute;
width: 100%;
}[/CODE]
hammer:


ayik dapet cendol genit:

Quote:
Original Posted By Musicrebirth
tapi kliatannya skrng lagi populer banget y gan..? ampe" lagi itu ane mw magang prepare ke html5 ama css3

nah syarat jika sebuah template html itu bs dibilang HTML5 itu musti ada ini y..?

[HTML][/HTML]
[HTML][/HTML]
[HTML][/HTML]

Unicodenya apa tuh gan..? minta unicodenya donk biar kaya lambang gitu..


ni gan:
[HTML]



♥♥♥♥♥

#♥☺☃ {
background: hotpink;
}

Chuck ipsum. God offered Chuck Norris the gift to fly, which he swiftly declined for super strength roundhouse ability. Chuck Norris found out about Conan O'Brien's lever that shows clips from "Walker: Texas Ranger" and is working on a way to make it show clips of Norris having sex with Conan's wife. If you can see Chuck Norris, he can see you. If you can't see Chuck Norris you may be only seconds away from death. Chuck Norris is Luke Skywalker’s real father. Playgirl magazine once asked Chuck Norris to appear naked in an issue, Chuck laughed at the opportunity saying “there isn’t enough paper in the world to contain my bearded member”. He then killed the editors simply by unzipping his pants. Chuck Norris invented a language that incorporates karate and roundhouse kicks. So next time Chuck Norris is kicking your ass, don’t be offended or hurt, he may be just trying to tell you he likes your hat. Chuck Norris doesn’t eat. Rather he kicks ass until he’s full. Chuck Norris once walked down the street with a massive erection. There we no survivors. When Chuck Norris played golf for money, chuck marked down a hole in 0 every time, a pro at the golf club, said to Chuck: "excuse me sir, but you cant score zero on a hole".
Chuck Norris turned towards the man and said, im Chuck Norris, the man then proceeded to pour gas over his body and set himself on fire because that would be less painful than getting roundhouse kicked by Chuck Norris, Chuck Norris roundhouse kicked him in the face anyways. Multiple people have died from Chuck Norris giving them the finger. When Chuck Norris was denied a Bacon McMuffin at McDonalds because it was 10:35, he roundhouse kicked the store so hard it became a KFC. Chuck Norris once ate three 72 oz. steaks in one hour. He spent the first 45 minutes having sex with his waitress. Filming on location for Walker: Texas Ranger, Chuck Norris brought a stillborn baby lamb back to life by giving it a prolonged beard rub. Shortly after the farm animal sprang back to life and a crowd had gathered, Chuck Norris roundhouse kicked the animal, breaking its neck, to remind the crew once more that Chuck giveth, and the good Chuck, he taketh away. If Chuck Norris is late, time better slow the f*ck down When the Boogeyman goes to sleep every night he checks his closet for Chuck Norris. Pee Wee Herman got arrested for masturbating in public. The same day, Chuck Norris got an award for masturbating in public. Chuck Norris used live ammunition during all shoot-outs. When a director once said he couldn’t, he replied, “Of course I can, I’m Chuck Norris,” and roundhouse kicked him in the face. Chuck Norris counted to infinity - twice. Chuck Norris kicked Neo out of Zion , now Neo is "The Two" If paper beats rock, rock beats scissors, and scissors beats paper, what beats all 3 at the same time? Answer: Chuck Norris. When his martial arts prowess fails to resolve a situation, Chuck Norris plays dead. When playing dead doesn’t work, he plays zombie.
[/HTML]
nurjalih - 05/09/2012 09:45 PM
#30

Quote:
Original Posted By gest
ayik dapet cendol genit:



ni gan:
[HTML]



♥♥♥♥♥

#♥☺☃ {
background: hotpink;
}


Chuck ipsum. God offered Chuck Norris the gift to fly, which he swiftly declined for super strength roundhouse ability. Chuck Norris found out about Conan O'Brien's lever that shows clips from "Walker: Texas Ranger" and is working on a way to make it show clips of Norris having sex with Conan's wife. If you can see Chuck Norris, he can see you. If you can't see Chuck Norris you may be only seconds away from death. Chuck Norris is Luke Skywalker’s real father. Playgirl magazine once asked Chuck Norris to appear naked in an issue, Chuck laughed at the opportunity saying “there isn’t enough paper in the world to contain my bearded member”. He then killed the editors simply by unzipping his pants. Chuck Norris invented a language that incorporates karate and roundhouse kicks. So next time Chuck Norris is kicking your ass, don’t be offended or hurt, he may be just trying to tell you he likes your hat. Chuck Norris doesn’t eat. Rather he kicks ass until he’s full. Chuck Norris once walked down the street with a massive erection. There we no survivors. When Chuck Norris played golf for money, chuck marked down a hole in 0 every time, a pro at the golf club, said to Chuck: "excuse me sir, but you cant score zero on a hole".
Chuck Norris turned towards the man and said, im Chuck Norris, the man then proceeded to pour gas over his body and set himself on fire because that would be less painful than getting roundhouse kicked by Chuck Norris, Chuck Norris roundhouse kicked him in the face anyways. Multiple people have died from Chuck Norris giving them the finger. When Chuck Norris was denied a Bacon McMuffin at McDonalds because it was 10:35, he roundhouse kicked the store so hard it became a KFC. Chuck Norris once ate three 72 oz. steaks in one hour. He spent the first 45 minutes having sex with his waitress. Filming on location for Walker: Texas Ranger, Chuck Norris brought a stillborn baby lamb back to life by giving it a prolonged beard rub. Shortly after the farm animal sprang back to life and a crowd had gathered, Chuck Norris roundhouse kicked the animal, breaking its neck, to remind the crew once more that Chuck giveth, and the good Chuck, he taketh away. If Chuck Norris is late, time better slow the f*ck down When the Boogeyman goes to sleep every night he checks his closet for Chuck Norris. Pee Wee Herman got arrested for masturbating in public. The same day, Chuck Norris got an award for masturbating in public. Chuck Norris used live ammunition during all shoot-outs. When a director once said he couldn’t, he replied, “Of course I can, I’m Chuck Norris,” and roundhouse kicked him in the face. Chuck Norris counted to infinity - twice. Chuck Norris kicked Neo out of Zion , now Neo is "The Two" If paper beats rock, rock beats scissors, and scissors beats paper, what beats all 3 at the same time? Answer: Chuck Norris. When his martial arts prowess fails to resolve a situation, Chuck Norris plays dead. When playing dead doesn’t work, he plays zombie.
[/HTML]


manstab gan,,,bisa unicode juga ya,,,

wah nice info gan

lanjut lagi agan" informasinya,,,iloveindonesias
gest - 05/09/2012 09:51 PM
#31

Quote:
Original Posted By nurjalih
manstab gan,,,bisa unicode juga ya,,,

wah nice info gan

lanjut lagi agan" informasinya,,,iloveindonesias


sejak html 4.01 dah bisa untuk class attributes, html5 lebih canggih lagi karena bisa untuk id attributes army:
Musicrebirth - 06/09/2012 04:55 PM
#32

Quote:
Original Posted By gest

ni gan:
[HTML]



♥♥♥♥♥

#♥☺☃ {
background: hotpink;
}

Chuck ipsum. God offered Chuck Norris the gift to fly, which he swiftly declined for super strength roundhouse ability. Chuck Norris found out about Conan O'Brien's lever that shows clips from "Walker: Texas Ranger" and is working on a way to make it show clips of Norris having sex with Conan's wife. If you can see Chuck Norris, he can see you. If you can't see Chuck Norris you may be only seconds away from death. Chuck Norris is Luke Skywalker’s real father. Playgirl magazine once asked Chuck Norris to appear naked in an issue, Chuck laughed at the opportunity saying “there isn’t enough paper in the world to contain my bearded member”. He then killed the editors simply by unzipping his pants. Chuck Norris invented a language that incorporates karate and roundhouse kicks. So next time Chuck Norris is kicking your ass, don’t be offended or hurt, he may be just trying to tell you he likes your hat. Chuck Norris doesn’t eat. Rather he kicks ass until he’s full. Chuck Norris once walked down the street with a massive erection. There we no survivors. When Chuck Norris played golf for money, chuck marked down a hole in 0 every time, a pro at the golf club, said to Chuck: "excuse me sir, but you cant score zero on a hole".
Chuck Norris turned towards the man and said, im Chuck Norris, the man then proceeded to pour gas over his body and set himself on fire because that would be less painful than getting roundhouse kicked by Chuck Norris, Chuck Norris roundhouse kicked him in the face anyways. Multiple people have died from Chuck Norris giving them the finger. When Chuck Norris was denied a Bacon McMuffin at McDonalds because it was 10:35, he roundhouse kicked the store so hard it became a KFC. Chuck Norris once ate three 72 oz. steaks in one hour. He spent the first 45 minutes having sex with his waitress. Filming on location for Walker: Texas Ranger, Chuck Norris brought a stillborn baby lamb back to life by giving it a prolonged beard rub. Shortly after the farm animal sprang back to life and a crowd had gathered, Chuck Norris roundhouse kicked the animal, breaking its neck, to remind the crew once more that Chuck giveth, and the good Chuck, he taketh away. If Chuck Norris is late, time better slow the f*ck down When the Boogeyman goes to sleep every night he checks his closet for Chuck Norris. Pee Wee Herman got arrested for masturbating in public. The same day, Chuck Norris got an award for masturbating in public. Chuck Norris used live ammunition during all shoot-outs. When a director once said he couldn’t, he replied, “Of course I can, I’m Chuck Norris,” and roundhouse kicked him in the face. Chuck Norris counted to infinity - twice. Chuck Norris kicked Neo out of Zion , now Neo is "The Two" If paper beats rock, rock beats scissors, and scissors beats paper, what beats all 3 at the same time? Answer: Chuck Norris. When his martial arts prowess fails to resolve a situation, Chuck Norris plays dead. When playing dead doesn’t work, he plays zombie.
[/HTML]


ih waw kk mantapp :2thumbup:2thumbup

gw baru tw kga pake syntax body bs jalan jg..
gest - 06/09/2012 05:35 PM
#33

Quote:
Original Posted By Musicrebirth
ih waw kk mantapp :2thumbup:2thumbup

gw baru tw kga pake syntax body bs jalan jg..


kan optional di html5.. kalo diperhatiin lagi dari dokumen html di atas tag juga optional jadi gak usah pake, gak usah ditutup (), quotes free (gak usah pake " atau ') dan gak usah pake penutup juga army:
is it cool? D
gigcarnation - 06/09/2012 07:25 PM
#34

Quote:
Original Posted By S4nJi


HTML5 Enhances semanticness of HTML4
CSS3 memperluas kemampuan CSS2, secara CSS2 masih baru dan masih bisa dikembangkan D

Anyways, CSS3 itu kalo mau ditulis di pejwan ya semua dong, dengan judul bukan "Cara mengganti scrollbar" or something, tapi ke arah selectornya langsung
Selector biasa juga jangan dilupain

Selector macam ini cuma CSS3 loh
[code]
div.wrapper > parent long.child > direct#child ~ preceded.child + immediately.preceded#child:not(.bukanclassini):first-child > .element[style*='color: red']:nth-child(odd) {
background: black; }
[/code]
Itu fully legal and working CSS3 selector D
So much could be explained from it p

Yang mau info latest tentang css3 or so, buka artikel W3C sering sering, di w3.org p
Ato alternatifnya, MDN, Mozilla Developer Network, aktif banget, fitur experimental langsung ada disitu p


soalnya css3 itu banyak amat kalau mau dijelasin D

Quote:
Original Posted By gest
mumpung ngomongin html5 dan css3..
btw, ada yang pernah pakai unicode character di id attributes? seperti id="♥☺☃"
katanya bisa langsung dipakai di css selector, seperti ini:
[CODE]
#♥☺☃ {
background: hotpink;
}
[/CODE]


Quote:
Original Posted By blukeciprak


yang nih dong gan, ntar ane cendolin deho


wah masgan, kalo unicode ane gak tau
tapi emangnya ada juga tuh yang mau buat atribut pake unicode hammer:

Quote:
Original Posted By gest


<body> kan optional di html5.. kalo diperhatiin lagi dari dokumen html di atas <head> tag juga optional jadi gak usah pake, gak usah ditutup (), quotes free (gak usah pake " atau ') dan gak usah pake penutup </html> juga army:
is it cool? D


tapi htmlnya jadi gak semantik lagi deh D
gest - 06/09/2012 08:07 PM
#35

Quote:
Original Posted By gigcarnation
soalnya css3 itu banyak amat kalau mau dijelasin D

wah masgan, kalo unicode ane gak tau
tapi emangnya ada juga tuh yang mau buat atribut pake unicode hammer:

tapi htmlnya jadi gak semantik lagi deh D


pakai unicode kenapa enggak? ini mungkin karena belum banyak yang tau aja. karena umumnya untuk id attributes orang menggunakan letters ([A-Za-z]) diikuti huruf atau angka, digits ([0-9]), hyphens (-), underscores (_), walaupun bisa juga colons ( : ), and periods (.).. sedangkan untuk class bisa character apa saja, dan tidak harus dimulai dengan huruf agar valid.
Dan ini semua sebetulnya sudah ada sejak html 4.01.
[CODE]http://www.w3.org/TR/html401/types.html#type-name[/CODE]
Untuk html5, perbedaan antara class dan id attributes hampir tidak ada, kecuali tetap tidak boleh kosong (setidaknya satu character) dan tidak boleh ada spasi.
[CODE]http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute[/COD E]

Sample demo page menggunakan bermacam character (termasuk unicode):
[CODE]http://mathiasbynens.be/demo/html5-id[/CODE]
Hasil dari html5 validator: valid kok! D
[CODE]http://html5.validator.nu/?doc=http://mathiasbynens.be/demo/html5-id[/CODE]

Untuk beberapa start dan end tag yang di atas memang optional dan bisa dihilangkan:
[CODE]http://www.w3.org/TR/html5/syntax.html#optional-tags[/CODE]
Dan untuk quotes sendiri, sekarang bisa dihilangkan:
[CODE]http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#unquoted[/CODE]
Berarti tetap semantic dong D

Masih gak percaya? Coba buka:
[CODE]http://google.com/404[/CODE]
Dan lihat source codenya army:
[CODE]




Error 404 (Not Found)!!1

*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}


404. That’s an error.
The requested URL /404 was not found on this server. That’s all we know.
[/CODE]

CMIIW
Musicrebirth - 06/09/2012 10:18 PM
#36

Quote:
Original Posted By gest
kan optional di html5.. kalo diperhatiin lagi dari dokumen html di atas tag juga optional jadi gak usah pake, gak usah ditutup (), quotes free (gak usah pake " atau ') dan gak usah pake penutup juga army:
is it cool? D


Wah keren banget... iy itu yg google 404 udh gk usah pake body lagi.. gk usah pake ditutup lagi ..

tapi klo elemen div gmana kk..? bingung

1 pertanyaan lagi berhub dengan unicode..

apa keuntungannya klo kita deklarasi id pake unicode gitu..? maaf ane newbie.. iloveindonesias
gest - 07/09/2012 12:02 AM
#37

Arghh.. overposting.. di beti muncul, yang di old enggak. ane tulis lagi aja deh, sori ts jadi ngotorin tempatnya.. malu:

Quote:
Original Posted By Musicrebirth
Wah keren banget... iy itu yg google 404 udh gk usah pake body lagi.. gk usah pake ditutup lagi ..

tapi klo elemen div gmana kk..? bingung

1 pertanyaan lagi berhub dengan unicode..

apa keuntungannya klo kita deklarasi id pake unicode gitu..? maaf ane newbie.. iloveindonesias


kan dah dikasih linknya di atas gan:
[CODE]http://www.w3.org/TR/html5/syntax.html#optional-tags[/CODE]
eniwei, ini sederhananya:

[*]Optional Start Tags:
[CODE]






[/CODE]
[*]Optional End Tags
[CODE]
Struktural:
, ,

Lists:
, ,

Table:
, , , , , ,

Juga:
,
[/CODE]


Selain itu macam , , , , dkk.. sama saja ikut spek sebelumnya.

Keuntungan id pake unicode adalah selain keliatan keren army: , fungsinya sama aja kayak id pake character biasa.
Mungkin catatan saja, kalau untuk readability kodingan (misal untuk pengerjaan koding secara team) bagusnya pakai yang umum2 saja dan gampang dipahami. hehe.. D
Maksudnya ane post disini adalah sebagai sharing saja. Peace:
Ok, back to TS \)

CMIIW
gigcarnation - 07/09/2012 06:02 PM
#38

Quote:
Original Posted By gest


pakai unicode kenapa enggak? ini mungkin karena belum banyak yang tau aja. karena umumnya untuk id attributes orang menggunakan letters ([A-Za-z]) diikuti huruf atau angka, digits ([0-9]), hyphens (-), underscores (_), walaupun bisa juga colons (\), and periods (.).. sedangkan untuk class bisa character apa saja, dan tidak harus dimulai dengan huruf agar valid.
Dan ini semua sebetulnya sudah ada sejak html 4.01.
[CODE]http://www.w3.org/TR/html401/types.html#type-name[/CODE]
Untuk html5, perbedaan antara class dan id attributes hampir tidak ada, kecuali tetap tidak boleh kosong (setidaknya satu character) dan tidak boleh ada spasi.
[CODE]http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute[/COD E]

Sample demo page menggunakan bermacam character (termasuk unicode):
[CODE]http://mathiasbynens.be/demo/html5-id[/CODE]
Hasil dari html5 validator: valid kok! D
[CODE]http://html5.validator.nu/?doc=http://mathiasbynens.be/demo/html5-id[/CODE]

Untuk beberapa start dan end tag yang di atas memang optional dan bisa dihilangkan:
[CODE]http://www.w3.org/TR/html5/syntax.html#optional-tags[/CODE]
Dan untuk quotes sendiri, sekarang bisa dihilangkan:
[CODE]http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#unquoted[/CODE]
Berarti tetap semantic dong D

Masih gak percaya? Coba buka:
[CODE]http://google.com/404[/CODE]
Dan lihat source codenya army:
[CODE]

<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
</style>

404. That’s an error.
The requested URL /404 was not found on this server. That’s all we know.
[/CODE]

CMIIW


ane juga gitu gan D
kirain unicode gak bisa dipake

btw untuk semantik menurut ane sih kagak, soalnay kagak ada tag penutupnya
soal google menurut ane sih itu kesalahan, soalnya google kan bukan patokan pembuatan website yang smeantik D

CMIIW
xdgemini - 07/09/2012 06:30 PM
#39

gan mo nanya kalo bikin clearfloat pake id atau class ya...soal nya pas ane check di HTML5 kena error...
contoh :
 
ato
 
S4nJi - 07/09/2012 06:47 PM
#40

Pake . di selector css3 bisa?
So something like this would work?
[html]
.pertama.keduax {
background: red; }

^^^

Ini mah bisa
lah ini?[/html]

Yep, : dan . fails
[code]http://jsfiddle.net/KDFTJ/[/code]

. bisa untuk multiclass, bukan class dengan titik
Mungkin bisa diselect pake javascript tapi css gak bisa untuk :
[html]
#element.class{
background: red; }

^^^
Ini bisa
Ini ga bisa, tapi bisa pake getElementById() seharusnya p
[/html]
Page 2 of 4 |  < 1 2 3 4 > 
Home > LOEKELOE > COMPUTER STUFF > Website, Webmaster, Webdeveloper > Bermain dengan teknologi HTML5: Part 3 (CSS3)