编程小贴士

给你的编程提供小点子


块级元素 vs 内联元素

HTML的元素可以分为两种:

  • 块级元素(block level element )
  • 内联元素(inline element )

二者的区别如下:      1. 块级元素独占一行(除非显示修改元素的display属性),内联元素在一行内显示;

2. 块级元素可以设置width、height属性,而内联元素设置这些属性无效;

3. 块级元素的默认width为100%,而内联元素的的width是根据其内容或子元素确定的。

 

二者的相互转化:

块级元素——>内联元素:display:inline;    内联元素——>块级元素:display:block;

 

介于二者之间的状态:

设置display:inline-block;属性,使元素对外表现为行内元素,在一行内显示;对内表现为块级元素,能设置width、height属性。

 

常见的块级元素和行内元素

块级元素:div p h1 h2 h3 h4 h5 h6 dl ul ol li table hr(水平分割线)

内联元素:a img span input(输入框) select(项目选择) textarea(多行文本输入框) sub(下标) sup(上标)

185 Responses to “ 块级元素 vs 内联元素 ”

  1. me suba说道:

    tTvhNX I think it is a nice point of view. I most often meet people who rather say what they suppose others want to hear. Good and well written! I will come back to your site for sure!

  2. this website说道:

    Major thankies for the article.Much thanks again. Will read on

  3. There as noticeably a bundle to find out about this. I assume you made sure good factors in options also.

  4. animal coloring说道:

    Thanks for sharing, this is a fantastic blog.Really thank you! Cool.

  5. italian honey fig How can I insert a tag cloud into my blog @ blogspot?

  6. kivi na bitkoin说道:

    very nice submit, i certainly love this website, keep on it

  7. tui xach nu说道:

    It?s really a great and helpful piece of info. I am glad that you simply shared this helpful info with us. Please keep us informed like this. Thanks for sharing.

  8. Im no professional, but I feel you just crafted an excellent point. You clearly know what youre talking about, and I can seriously get behind that. Thanks for being so upfront and so truthful.

  9. Looking forward to reading more. Great blog.Really looking forward to read more. Awesome.

  10. to learn more说道:

    Wow, amazing blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is fantastic, let alone the content!. Thanks For Your article about sex.

  11. Jak zosta dobrym sprzedawc Sprzeda przez telefon

  12. some genuinely interesting info , well written and generally user friendly.

  13. Nwokolo说道:

    Very interesting info !Perfect just what I was looking for!

  14. thiet ke noel说道:

    Im no pro, but I consider you just crafted a very good point point. You certainly know what youre talking about, and I can really get behind that. Thanks for staying so upfront and so truthful.

  15. This blog is obviously educating and amusing. I have picked a lot of interesting tips out of it. I ad love to visit it again soon. Thanks a bunch!

  16. Womens Ray Ban Sunglasses Womens Ray Ban Sunglasses

  17. Thanks for the blog post.Really thank you! Much obliged.

  18. Rihanna说道:

    There is perceptibly a lot to realize about this. I feel you made various nice points in features also.

  19. gading bola说道:

    Is anyone else having this issue or is it a issue on my end?

  20. quan ao cho meo说道:

    Wonderful paintings! This is the type of info that should be shared across the web. Shame on Google for no longer positioning this post higher! Come on over and consult with my site. Thank you =)

  21. This web site certainly has all the info I needed concerning this subject and didn at know who to ask.

  22. Piece of writing writing is also a excitement, if you know afterward you can write if not it is complex to write.|

  23. This site was how do I say it? Relevant!! Finally I ave found something which helped me. Many thanks!

  24. make this website yourself or did you hire someone to do it for you?

  25. Pretty! This was an incredibly wonderful article. Many thanks for providing this information.

  26. This blog is obviously cool additionally informative. I have chosen a bunch of useful stuff out of this blog. I ad love to return every once in a while. Thanks a lot!

  27. Thanks-a-mundo for the blog post.Thanks Again. Much obliged.

  28. I’а†ve recently started a web site, the info you provide on this website has helped me tremendously. Thank you for all of your time & work.

  29. Elena Matei说道:

    Thank you for your blog.Much thanks again. Much obliged.

  30. Emmanuel Ekanem说道:

    Svens Bilder Laufen Marathon Triathlon Fotos

  31. stella说道:

    Thankyou for this marvelous post, I am glad I detected this website on yahoo.

  32. we all be familiar with media is a great source of facts.

  33. Thank you for your article post.Really looking forward to read more. Really Cool.

  34. Thank you a lot and I am having a look ahead to contact you.

  35. Crochet说道:

    Lacoste Outlet Online Hi there, just wanted to tell you, I enjoyed this post. It was helpful. Keep on posting!

  36. local说道:

    Regards for helping out, great information.

  37. white shoes说道:

    Salute! Thank you very much for this marvelous website. It was fantastic joy to read.

  38. to read more说道:

    Some really excellent information, Gladiola I observed this.

  39. kouponkabla.com说道:

    There is evidently a bunch to know about this. I feel you made some nice points in features also.

  40. visit website说道:

    Thanks for sharing this first-class write-up. Very inspiring! (as always, btw)

  41. Really enjoyed this blog post.Much thanks again. Much obliged.

  42. School news说道:

    If some one wishes expert view on the topic of running a blog after

  43. Really enjoyed this blog article.Thanks Again. Much obliged.

  44. This particular blog is definitely cool and also factual. I have picked a bunch of helpful things out of this blog. I ad love to return again and again. Thanks a bunch!

  45. Major thankies for the post.Really looking forward to read more. Cool.

  46. Sorry for my bad English.Wow, marvelous blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is great, let alone the content!

  47. darey说道:

    I went over this web site and I conceive you have a lot of superb info, saved to my bookmarks (:.

  48. nh punta cana说道:

    Thanks for sharing, this is a fantastic article post. Awesome.

  49. more info说道:

    Thanks-a-mundo for the post.Much thanks again. Great.

  50. Its hard to find good help I am constantnly saying that its hard to find good help, but here is

  51. official site说道:

    There is apparently a bunch to identify about this. I assume you made some good points in features also.

  52. Looking forward to reading more. Great article.Really thank you! Awesome.

  53. This website was how do I say it? Relevant!! Finally I have found something that helped me. Thanks a lot!

  54. That is a good tip particularly to those new to the blogosphere. Brief but very accurate info Many thanks for sharing this one. A must read post!

  55. Yes, you are correct friend, on a regular basis updating weblog is really essential in favor of SEO. Nice discussion keeps it up.

  56. You made some decent points there. I did a search on the topic and found most persons will approve with your site.

  57. Thanks foor a marfelous posting! I really enjoyed reading it,

  58. I value the blog article.Really looking forward to read more. Keep writing.

  59. have a look at说道:

    Usually I don at read article on blogs, but I would like to say that this write-up very compelled me to try and do it! Your writing style has been amazed me. Thanks, very nice post.

  60. Thanks again for the article post.Really looking forward to read more. Really Cool.

  61. app说道:

    This very blog is no doubt interesting additionally amusing. I have picked a bunch of useful tips out of this amazing blog. I ad love to visit it over and over again. Thanks a bunch!

  62. more information说道:

    Wonderful items from you, man. I ave bear in mind your stuff prior to and you are

  63. for more details说道:

    Some truly prize blog posts on this internet site , bookmarked.

  64. You, my pal, ROCK! I found exactly the information I already searched everywhere and simply could not find it. What a great web site.

  65. may bo dam说道:

    Of course, what a splendid blog and illuminating posts, I surely will bookmark your blog.All the Best!

  66. Very good post.Really looking forward to read more.

  67. view说道:

    Thanks for sharing this first-class piece. Very inspiring! (as always, btw)

  68. Kalbos vartojimo uduotys. Lietuvi kalbos pratimai auktesniosioms klasms Gimtasis odis

  69. check here说道:

    This awesome blog is definitely interesting as well as factual. I have picked up a lot of interesting stuff out of this amazing blog. I ad love to go back again soon. Cheers!

  70. Wow! This can be one particular of the most helpful blogs We ave ever arrive across on this subject. Actually Wonderful. I am also a specialist in this topic so I can understand your hard work.

  71. orlando seo说道:

    Very nice article. I absolutely love this website. Thanks!

  72. This website definitely has all of the information I wanted about this subject and didn at know who to ask.

  73. go here说道:

    This is very interesting, You are a very skilled blogger. I ave joined your rss feed and look forward to seeking more of your fantastic post. Also, I have shared your website in my social networks!

  74. Very good article post.Really thank you! Really Great.

  75. I truly appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You ave made my day! Thanks again!

  76. Im obliged for the post.Much thanks again. Fantastic.

  77. take a look at说道:

    I savour, cause I discovered exactly what I was taking a look for. You ave ended my four day long hunt! God Bless you man. Have a nice day. Bye

  78. Im thankful for the post.Thanks Again. Much obliged.

  79. sbobet说道:

    Very nice post. I definitely appreciate this website. Continue the good work!

  80. daftar sbobet说道:

    Really enjoyed this blog.Thanks Again. Really Cool.

  81. Just thought i would comment and say neat design, did you code it yourself? Looks great. Just found here

  82. phim hai说道:

    Major thankies for the article.Really thank you! Really Cool.

  83. Very good article.Really looking forward to read more. Really Cool.

  84. I think other site proprietors should take this web site as an model, very clean and great user genial style and design, let alone the content. You are an expert in this topic!

  85. What as up, I read your blogs like every week. Your writing style is awesome, keep up the good work!

  86. My brother recommended I might like this website. He was totally right. This post actually made my day. You cann at imagine just how much time I had spent for this information! Thanks!

  87. Wow, amazing blog Wow, amazing blog layout! How long have you been blogging for? you make blogging look easy

  88. Regards for this wondrous post, I am glad I detected this web site on yahoo.

  89. check out说道:

    Keep in the excellent function, I read few articles on this website along with I conceive your web blog is incredibly interesting and contains got companies of fantastic info.

  90. This particular blog is without a doubt awesome additionally informative. I have picked up a lot of helpful tips out of this source. I ad love to come back again soon. Thanks a lot!

  91. clothing store说道:

    Looking forward to reading more. Great post. Will read on

  92. may dieu khac go说道:

    Thank you for helping out, wonderful info. It does not do to dwell on dreams and forget to live. by J. K. Rowling.

  93. pretty handy material, overall I imagine this is really worth a bookmark, thanks

  94. IaаАа’б‚Т€ТšаЂаŒаАа’б‚Т€ТžаБТžve read some good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to make such a fantastic informative web site.

  95. Usually I don at read article on blogs, however I would like to say that this write-up very compelled me to check out and do so! Your writing taste has been amazed me. Thanks, quite nice article.

  96. Zebra说道:

    I was looking for this particular information for a very long time.

  97. Usually I don at learn post on blogs, but I would like to say that this write-up very compelled me to check out and do so! Your writing taste has been surprised me. Thanks, very nice post.

  98. bitcoin说道:

    You have mentioned very interesting points! ps nice site.

  99. hifu说道:

    I? not that much of a online reader to be honest but your blogs really nice, keep it up! I all go ahead and bookmark your site to come back later on. Cheers

  100. bo dam说道:

    Very neat article.Much thanks again. Keep writing. ventolin

  101. Thanks for great post. I read it with big pleasure. I look forward to the next post.

  102. KS说道:

    I value the article post.Really thank you! Much obliged.

  103. other说道:

    My brother recommended I might like this website. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks!

  104. There is clearly a lot to know about this. I assume you made various nice points in features also.

  105. Just a smiling visitor here to share the love (:, btw outstanding pattern. Everything should be made as simple as possible, but not one bit simpler. by Albert Einstein.

  106. Say, you got a nice blog post.Really thank you! Awesome.

  107. thoroughly mixed. Promotional merchandise is a great approach to advertise your organization.

  108. Only wanna state that this is very beneficial , Thanks for taking your time to write this.

  109. best pron说道:

    U6xcWz There is visibly a bunch to realize about this. I believe you made certain nice points in features also.

  110. suba me说道:

    10qztQ This site was… how do I say it? Relevant!! Finally I’ve

  111. It as hard to find expert persons by this matter, then again you sound like you already make out what you are talking about! Thanks

  112. Usually I do not learn post on blogs, however I would like to say that this write-up very forced me to check out and do it! Your writing style has been surprised me. Thanks, quite nice post.

  113. Thanks so much for the blog.Thanks Again. Will read on

  114. Muchos Gracias for your blog article.Really thank you! Cool.

  115. Im obliged for your blog. Much many thanks. Keep beginner as guide to.

  116. Right now it looks like WordPress is the best blogging platform out

  117. go there说道:

    I will immediately grab your rss feed as I can at find your e-mail subscription link or newsletter service. Do you ave any? Please let me know in order that I could subscribe. Thanks.

  118. whoah this blog is excellent i love reading your articles. Keep up the good work! You know, a lot of people are looking around for this information, you can aid them greatly.

  119. I think you have mentioned some very interesting details , regards for the post.

  120. bistro masa说道:

    Very nice post. I certainly love this site. Keep it up!

  121. There is definately a lot to find out about this subject. I really like all the points you have made.

  122. animal porn game说道:

    It was big joy to detect and read this comprehensive blog. Fantastic reading!

  123. Tattoo Artist说道:

    This particular blog is without a doubt awesome and besides informative. I have chosen a bunch of useful stuff out of this blog. I ad love to come back again and again. Cheers!

  124. link vao 188bet说道:

    Lovely just what I was looking for.Thanks to the author for taking his clock time on this one.

  125. over a lot of the same subjects as yours and I think

  126. I really liked your article.Much thanks again. Will read on

  127. It as nearly impossible to find educated people on this topic, however, you sound like you know what you are talking about! Thanks

  128. casino说道:

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your web site is fantastic, let alone the content!

  129. My brother suggested I might like this blog. He was totally right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!

  130. you. This is really a tremendous web site.

  131. nude说道:

    Perfectly written content, thanks for selective information.

  132. Really informative blog post.Thanks Again. Really Great.

  133. crypto说道:

    I truly appreciate this post. Ia??a?аАа’аАТ‚аЂ ve been looking everywhere for this! Thank goodness I found it on Bing. You ave made my day! Thanks again

  134. Your style is so unique compared to other folks I ave read stuff from. Thanks for posting when you have the opportunity, Guess I will just bookmark this web site.

  135. Some really prime content on this web site , bookmarked.

  136. Simply want to say your article is as surprising. The clarity in

  137. Looking around I like to look around the web, regularly I will just go to Stumble Upon and follow thru

  138. sydney escorts说道:

    Wohh just what I was searching for, thanks for placing up.

  139. wow, awesome blog.Much thanks again. Really Great.

  140. Right now it looks like BlogEngine is the top blogging platform available right now. (from what I ave read) Is that what you are using on your blog?

  141. You have observed very interesting points ! ps decent website. There as always one who loves and one who lets himself be loved. by W. Somerset Maugham.

  142. News37.Com说道:

    Im no pro, but I imagine you just crafted the best point. You undoubtedly know what youre talking about, and I can really get behind that. Thanks for being so upfront and so truthful.

  143. 먹튀 검증说道:

    Looking forward to reading more. Great post.Really looking forward to read more. Really Great.

  144. Keep up the fantastic piece of work, I read few content on this internet site and I conceive that your site is rattling interesting and has circles of superb information.

  145. purchase music说道:

    Some times its a pain in the ass to read what website owners wrote but this internet site is real user pleasant!.

  146. If you are ready to watch comical videos online then I suggest you to pay a visit this web page, it includes in fact so humorous not only movies but also additional data.

  147. 릴게임说道:

    pretty useful material, overall I consider this is worthy of a bookmark, thanks

  148. TE210说道:

    Wanted to drop a remark and let you know your Rss feed isnt working today. I tried including it to my Google reader account but got nothing.

  149. I really liked your blog post. Really Great.

  150. 토토 사이트说道:

    What as Happening i am new to this, I stumbled upon this I ave discovered It positively helpful and it has aided me out loads. I hope to contribute & help other customers like its helped me. Good job.

  151. Thank you ever so for you blog. Keep writing.

  152. 다잡아说道:

    Really enjoyed this blog.Really thank you! Much obliged.

  153. Really appreciate you sharing this blog.Really looking forward to read more. Really Great.

  154. This awesome blog is obviously cool and also factual. I have picked many helpful advices out of it. I ad love to return again soon. Thanks a lot!

  155. omega-3说道:

    This page definitely has all of the information and facts I needed concerning this subject and didn at know who to ask.

  156. Im getting a javascript error, is anyone else?

  157. 먹튀 폴리스说道:

    It as a very easy on the eyes which makes it much more enjoyable for me

  158. Very nice post and straight to the point. I am not sure if this is actually the best place to ask but do you guys have any thoughts on where to hire some professional writers? Thank you

  159. What as up Dear, are you truly visiting this website regularly,

  160. Thanks again for the post.Really looking forward to read more. Awesome.

  161. you have a great blog here! would you like to make some invite posts on my blog?

  162. You should take part in a contest for among the best blogs on the web. I will advocate this website!

  163. Ones blog is there one among a form, i be keen on the way you put in order the areas.:aаАа’б‚Т€ТšаЂаŒаАа’б‚Т€ТžаБТž-aаАа’б‚Т€ТšаЂаŒ?aаАа’б‚Т€ТšаЂаŒ?

  164. I think this is a real great blog article.Thanks Again. Keep writing.

  165. Very good post. I am going through some of these issues as well..

  166. 다잡아说道:

    I similar to Your Post about Khmer Funny

  167. 바다 이야기说道:

    Thanks for sharing, this is a fantastic blog post.Much thanks again. Fantastic.

  168. 토토사이트说道:

    I truly appreciate this post. I have been looking everywhere for this! Thank God I found it on Google. You ave made my day! Thank you again.

  169. old young porn说道:

    I truly appreciate this post. I have been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again!

  170. Lancel soldes ??????30????????????????5??????????????? | ????????

  171. Very interesting info!Perfect just what I was searching for!

  172. You ave made some good points there. I checked on the net to learn more about the issue and found most individuals will go along with your views on this web site.

  173. This excellent website truly has all the information I wanted concerning this subject and didn at know who to ask.

  174. You made some really good points there. I checked on the web to learn more about the issue and found most people will go along with your views on this site.

  175. 바다이야기说道:

    Only wanna input that you may have a very nice internet site, I enjoy the design and style it actually stands out.

  176. 다자바说道:

    This site truly has all of the info I needed concerning this subject and didn at know who to ask.

  177. I think this is a real great article post.Really thank you! Keep writing.

  178. Bootylicious girls with huge nude asses, massive booties, whatever you may call it, you know that they are hot on Big ass porn. Slutty hot big-ass shaking is driving man nutts. Sinful and sexy big-ass porn videos are taking anal poking to the next level.

  179. 토토 사이트说道:

    Whoa! This blog looks exactly like my old one! It as on a totally different subject but it has pretty much the same layout and design. Outstanding choice of colors!

  180. Woh I like your blog posts, saved to favorites !.

  181. Very neat article post.Much thanks again.

  182. That is a beautiful picture with very good light -)

  183. home declutter说道:

    Loving the info on this web site, you ave got done outstanding job on the content.

  184. lol. So allow me to reword this. Thank YOU for the meal!!

  185. into anything. I truly enjoy reading your blog and I look

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>