Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML格式行的开头和结尾_Html_Formatting - Fatal编程技术网

HTML格式行的开头和结尾

HTML格式行的开头和结尾,html,formatting,Html,Formatting,我有一个html的问题,我已经研究了很多,并没有找到太多的帮助。 我想在行首打印一个名字,在行尾打印另一个名字,就是它。插入空格不是一个好的选择,因为页面是按%设计的,适合各种屏幕。 怎么做? 尝试下面的方法(此处演示) .left{float:left} .right{float:right} .clear{clear:两个} 名称1 姓名2 名字3 名字4 你能发布一些东西来说明你想要实现的目标吗? <html> <head> <meta

我有一个html的问题,我已经研究了很多,并没有找到太多的帮助。 我想在行首打印一个名字,在行尾打印另一个名字,就是它。插入空格不是一个好的选择,因为页面是按%设计的,适合各种屏幕。 怎么做?

尝试下面的方法(此处演示)


.left{float:left}
.right{float:right}
.clear{clear:两个}
名称1
姓名2
名字3
名字4

你能发布一些东西来说明你想要实现的目标吗?
<html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">

      <style type='text/css'>
        .left {float:left}
        .right {float:right}
        .clear {clear:both}
      </style>

    </head>
    <body>
      <div class="left clear">name1</div>
      <div class="right">name2</div>
      <div class="left clear">name3</div>
      <div class="right">name4</div>

    </body>


    </html>