如何在不同的屏幕分辨率下停止div调整大小

时间:2018-07-30 06:57:27

标签: html css resize

这是一个wordpress网站,我有文本框,此文本框的高度根据屏幕分辨率而变化,因此创建了ID换行,仍根据屏幕调整大小,有人可以告诉我如何停止重压

我的CSS

 #wrap{

    height: 630px !important;

    }

<div id="wrap">
<div style="font-size: 60px; color: #399bc8; font-family: IBM Plex serif;"><strong>01</strong></div>
[fusion_separator style_type="default" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" sep_color="rgba(98,57,189,0)" top_margin="" bottom_margin="48px" border_size="" icon="" icon_circle="" icon_circle_color="" width="" alignment="center"][/fusion_separator]
<div style="font-size: 40px; color: #3f4143; font-family: IBM Plex serif;">Events</div>
[fusion_separator style_type="default" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" sep_color="rgba(98,57,189,0)" top_margin="" bottom_margin="30px" border_size="" icon="" icon_circle="" icon_circle_color="" width="" alignment="center"][/fusion_separator]
<div style="color: #3f4143;">
<ul>
    <li>Get trained on the hospitality industry prior to attending</li>
    <li>Identify key projects and associated project stakeholders – Client, Operator, Consultants, Architects and Interior Designers</li>
    <li>Meet the active Hospitality stakeholders with projects for 2019-2021</li>
    <li>Spend your Marketing budget wisely</li>
</ul>
</div>
<div>[fusion_separator style_type="default" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" sep_color="rgba(98,57,189,0)" top_margin="" bottom_margin="10px" border_size="" icon="" icon_circle="" icon_circle_color="" width="" alignment="center"][/fusion_separator]</div>
[fusion_button link="https://thehospitalitynetwork.com/how-it-works/" text_transform="" title="" target="_self" link_attributes="" alignment="" modal="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="buttonnospan" id="" color="custom" button_gradient_top_color="#ffffff" button_gradient_bottom_color="#ffffff" button_gradient_top_color_hover="#399bc8" button_gradient_bottom_color_hover="#399bc8" accent_color="#399bc8" accent_hover_color="" type="" bevel_color="" border_width="2" size="" stretch="default" shape="square" icon="" icon_position="left" icon_divider="no" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset=""]View More[/fusion_button]

</div>

2 个答案:

答案 0 :(得分:1)

尝试将div高度放入其媒体查询中,以调整特定屏幕的大小。那么,对div的全局定义是否带有高度?这将是默认高度,当屏幕未调整大小时会使用该默认高度吗?

答案 1 :(得分:1)

您必须为文本框设置此==> overflow-x:scroll;并设置固定高度或#wrap