0


我有一个两列内容主题,其中一列为
文本,另一列为图像 - 图像,图像 - 文本,

但对于移动设备,我需要它在 Text - Img、Text - Img、Text - Img、Text - Img、Text - Img
我的列代码

.one-half,
.three-sixths,
.two-fourths {
width: 48.4375%;
line-height: 1.2875;
 }

html代码

  <div class="one-half first"></div>
  <div class="one-half"></div>

他们是否有可能仅在 html 或 css 中在移动设备中更改它(如果是,那么如何?)

我的网站网址

4

1 回答 1

0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.one-half-first
{
float:left;
width:300px;
}
.one-half
{
float:left;
width:300px;
}
.clear
{
clear:both;
}
@media all and (max-width: 500px) and (min-width: 200px)
{
.one-half-first
{
float:left;
width:100px;
position:relative;
left:20px;
}
.one-half
{
float:left;
width:100px;
position:relative;
left:100px;
}
.one-half img
{
width:50px;
height:auto;
}
.clear
{
clear:both;
}

}
</style>
</head>

<body>

<div class="one-half-first">ihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdsc</div>
  <div class="one-half"><img src="file:///C|/tribhuvan/s2 dump/DCIM/sms/2012-08-14 10.29.41-1.jpg" width="300" height="200" /></div>
<div class="clear"></div>
<div class="one-half"><img src="file:///C|/tribhuvan/s2 dump/DCIM/sms/2012-08-14 10.29.41-1.jpg" width="300" height="200" /></div>
<div class="one-half-first">ihbibdsc ihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdsc</div>

<div class="clear"></div>
<div class="one-half-first">ihbibdsc ihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdscihbdbgrbgbdfvv vfv sfviuhisdv ksbihv ijbsiv ibisfv ibisv
monjonsv kbniksfv kinsviknv nionsiov iknbibsv nklnosv ibdsc</div>
  <div class="one-half"><img src="file:///C|/tribhuvan/s2 dump/DCIM/sms/2012-08-14 10.29.41-1.jpg" width="300" height="200" /></div>
<div class="clear"></div>
</body>
</html>

试试这个兄弟,这个 shud 可以帮助你解决任何其他实际问题或代码不使用你的代码请让我知道我有很多其他方法可以解决你喜欢的问题。

于 2013-05-04T18:54:28.527 回答