gpt4 book ai didi

html - 需要帮助找到哪个 div element.style 归因于

转载 作者:太空宇宙 更新时间:2023-11-04 06:36:49 24 4
gpt4 key购买 nike

我在 SaaS 程序中工作,该程序允许您输入带有一些 html 的自定义 CSS 文件。这意味着我无法从他们的代码中删除任何内容,只能覆盖它。我在他们的代码中找到了一个 element.style 但我不知道如何覆盖它,因为我找不到它附带的 div 或类。有问题的行是 <div style="margin:5px; width:140px; height:20px; float:right;" align="right"> .我要换width: 140px200px

  <div class="boxcontent">
<div style="width:100%; height:42px;">
<div style="margin:5px; width:400px; height:30px; float:left;">
<div class="dashboard_dropdown_btn" id="metric_drop_0">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_0">Ideas</span>
</div>
</div>

<div class="dashboard_dropdown_btn" id="metric_drop_1" style=
"display:none; margin-left:5px;">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_1">Ideas</span>
</div>
</div>

<div class="dashboard_dropdown_btn" id="metric_drop_2" style=
"display:none; margin-left:5px;">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_2">Ideas</span>
</div>
</div>

<div class="dashboard_edit_div">
<a href="javascript:void(0);" id="dashboard_edit_btn">Edit</a>
</div>
</div>

<div style="margin:5px; width:140px; height:20px; float:right;" align="right">
<div style="float:left; margin-right:5px; line-height:20px;">
View by:
</div>

<div onclick="selectView('d');" class="select_icon" id="select_day" style=
"float:left;" rel="on" title="Day"></div>

<div onclick="selectView('w');" class="select_icon" id="select_week" style=
"float:left;" title="Week"></div>

<div onclick="selectView('m');" class="select_icon" id="select_month" style=
"float:left;" title="Month"></div>
</div>

最佳答案

.boxcontent>div>div:nth-child(2) {
background-color: red;
width: 200px !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="boxcontent">
<div style="width:100%; height:42px;">
<div style="margin:5px; width:400px; height:30px; float:left;">
<div class="dashboard_dropdown_btn" id="metric_drop_0">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_0">Ideas</span>
</div>
</div>

<div class="dashboard_dropdown_btn" id="metric_drop_1" style="display:none; margin-left:5px;">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_1">Ideas</span>
</div>
</div>

<div class="dashboard_dropdown_btn" id="metric_drop_2" style="display:none; margin-left:5px;">
<div class="color_image">
&nbsp;
</div>

<div class="text">
<span id="metric_type_2">Ideas</span>
</div>
</div>

<div class="dashboard_edit_div">
<a href="javascript:void(0);" id="dashboard_edit_btn">Edit</a>
</div>
</div>

<div style="margin:5px; width:140px; height:20px; float:right;" align="right">
<div style="float:left; margin-right:5px; line-height:20px;">
View by:
</div>

<div onclick="selectView('d');" class="select_icon" id="select_day" style="float:left;" rel="on" title="Day"></div>

<div onclick="selectView('w');" class="select_icon" id="select_week" style="float:left;" title="Week"></div>

<div onclick="selectView('m');" class="select_icon" id="select_month" style="float:left;" title="Month"></div>
</div>
</div>
</div>

关于html - 需要帮助找到哪个 div element.style 归因于,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54148634/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com