0

次の html コードがあるとします。

<img src="pic.jpg"/>
<h1>Title!</h1>
<h5>A subtext</h5>
<hr/>

次の結果が得られる css コードは何ですか?

css_example

4

1 に答える 1

1
<div id="container">

<div class="content_left">
  <h1>Title!</h1>
  <h5>A subtext</h5>
  <hr/>
</div>
<div class="content_right">
  <img src="pic.jpg"/>
</div>
<div>

CSS:

#container {
  width: yourwidth;
  height: yourheight;
}

.content_right {
  float:right;
  width: width of image;
}
.content_left {
  float:left;
  width: width of text;
}

もちろん、これはこれを行うことができる多くの方法の1つにすぎません...

于 2012-08-14T09:02:55.167 に答える