Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.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_Styling - Fatal编程技术网

Html 如何改进这种造型?

Html 如何改进这种造型?,html,styling,Html,Styling,我正在尝试将我自己的代码(块)嵌入到登录页生成器中,我有两个问题 如何改进样式,使其不破坏文字(用红色标记) 如何使第二行文本从左至右与上一行(用黄色标记)具有相同的边距 这就是现在的样子: 非常感谢您的详细说明。对于第一个问题,您可以在css中使用空格。 例如: <style> .mytagWithoutWordBreaking { white-space: nowrap } </style> <!--- Other head content -->

我正在尝试将我自己的代码(块)嵌入到登录页生成器中,我有两个问题

  • 如何改进样式,使其不破坏文字(用红色标记)

  • 如何使第二行文本从左至右与上一行(用黄色标记)具有相同的边距

  • 这就是现在的样子:


    非常感谢您的详细说明。

    对于第一个问题,您可以在css中使用空格。 例如:

    <style>
    .mytagWithoutWordBreaking {
        white-space: nowrap
    }
    </style>
    <!--- Other head content -->
    <div class="mytagWithoutWordBreaking">Hi!</div>
    
    
    .MyTag无需中断{
    空白:nowrap
    }
    你好
    
    您可以使用第二个div或p元素来确保它将显示内联块。 例如:

    
    第一行

    第二行/p>
    我希望这能解决你的问题

    编辑

    有关css中空白的更多信息,请查看此页面:


    关于css中的内联块:

    嘿,如果您提供一个代码示例,这将非常有用,因此答案将对更多人有所帮助。
    <div class="wrapper">
    <p style="display:inline-block">First line</p>
    <p style="display:inline-block">Second line/p>
    </div>