Achieve results
School Number name Class course teacher
Table background is set to green, cell center display
Study number part, blue font, 16 lb size;
Name Part red font, underlined, 12 lb size
Class course name, teacher, green font, 12 lb size
XML code:
1 <?XML version= "1.0" encoding= "UTF8"?>2 <?xml-stylesheet type= "text/css" href= "Student.css "?>3 <Students>4 <Student>5 <Sid>School Number</Sid>6 <sname>Name</sname>7 <Sclass>Class</Sclass>8 <Scourse>Course</Scourse>9 <Teacher>Classroom Instructor</Teacher>Ten </Student> One <Student> A <Sid>1215115001</Sid> - <sname>Fruit Fruit</sname> - <Sclass>Software Design</Sclass> the <Scourse>Data</Scourse> - <Teacher>Wang Yu</Teacher> - </Student> - + <Student> - <Sid>1215115001</Sid> + <sname>Obviously</sname> A <Sclass>Database</Sclass> at <Scourse>Algorithm analysis</Scourse> - <Teacher>Wang Bo</Teacher> - </Student> - <Student> - <Sid>1215115001</Sid> - <sname>Beibei</sname> in <Sclass>Game development</Sclass> - <Scourse>Database programming</Scourse> to <Teacher>Land</Teacher> + </Student> - </Students>
CSS code:
1 Students2 {3 border:1px solid;4 color: #33FF66;5 width:500px;6 height:170px;7 Text-align:center;8 Vertical-align:middle;9 Position:middle;Ten } One Student A { - background-color: #33FF66; - Display:block; the margin:5px 5px 5px 5px; - border:1px solid;//table Border - width:500px; - + } - Sid + { A Color:blue; at font-size:16pt; - Display:inline; - line-height:30px;//Table Height - - } - sname in { - color:red; to font-size:12pt; + Text-decoration:underline; - Display:inline; the line-height:30px; * $ }Panax Notoginseng Sclass,scourse,teacher - { the + Color:green; A font-size:12pt; the Display:inline; + line-height:30px; -}
Reference Link: http://xml.jz123.cn/xml_display.asp.htm
Http://www.divcss5.com/rumen/r119.shtml
Using CSS to display XML