jquery - 需要帮助定制 jQuery portlet

标签 jquery css

我对 CSS 的经验很少,也不知道如何自定义 jQuery portlet。

我有以下内容: Image link

我想要这样的东西: Image link

HTML:

<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
    <div class="portlet-header ui-widget-header ui-corner-all">
        <span class="glyphicon glyphicon-trash"></span>
        <span class="glyphicon glyphicon-plus portlet-toggle"></span>
            nuevo campo
    </div>
    <div class="portlet-content" style="display: none;">
    </div>
</div>    

CSS:

.portlet {
    margin: 0 1em 1em 0;
    padding: 0.3em;
}

.portlet-header {
    padding: 0.2em 0.3em;
    margin-bottom: 0.5em;
    position: relative;
}

.portlet-toggle {
    position: absolute;
    top: 50%;
    right: 1%;
    margin-top: -8px;
}

.portlet-content {
    padding: 0.4em;
}

.portlet-placeholder {
    border: 1px dotted black;
    margin: 0 1em 1em 0;
    height: 50px;
}

我怎样才能做到这一点?

最佳答案

从 .portlet 类中删除填充并向 .portlet-header 类添加更多填充。

关于jquery - 需要帮助定制 jQuery portlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37735220/

相关文章:

ajax - 检查图片是否存在,如果不存在则加载

javascript - 在 Jquery 的每次 ajax 调用中附加我的 session ID

javascript - 使多回调与 jQuery $.when 同步

javascript - 从文本选择中确定节点名称

css - 如何使眼睛图标的位​​置响应

javascript - jQuery 选择器由 a、class、href 组成

html - Safari 在文本旁边添加空格,Safari 错误?

css - 如何在重复模式中选择一系列元素

javascript - 基于当前所选选项卡的动态导航栏突出显示

css - 使用 CSS 更改 Joomla 3 中的一个菜单项位置