gpt4 book ai didi

jquery - 使用 Tweet jQuery 插件垂直对齐
  • 文本和
  • 转载 作者:太空宇宙 更新时间:2023-11-04 15:26:43 25 4
    gpt4 key购买 nike

    我目前正在我正在构建的网站上使用 seaofclouds“Tweet”插件:

    http://tinyurl.com/c88fx5j

    Tweet 插件是使用 jQuery 和 CSS 预构建的,我已经想出了如何通过 CSS 将插件设置为我喜欢的样式,但是 li 元素没有与 Twitter 用户的头像垂直对齐让我失望,我还没有无法弄清楚。

    我想将 mdidle 中的 li 文本与每个帖子左侧的 Twitter 头像垂直对齐,如何实现?

    我的 CSS:

       .tweet,
    .query {
    font: 14px sans-serif;
    color: #000000;
    }

    .tweet_list {
    -webkit-border-radius: 0.5em;
    -moz-border-radius: 0.5em;
    border-radius: 0.5em;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: hidden;
    background-color: #fff;

    }


    .tweet_list li {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5em;
    list-style-type: none;
    vertical-align: middle;
    display: inline-block;


    }


    .tweet_list li a {
    color: #0099FF;
    text-decoration:underline;
    padding-right: 5px;
    }

    .tweet_list .tweet_even {
    background-color: #fff;
    }

    .tweet_list .tweet_avatar {
    padding-right: 15px;
    float: left;


    }

    .tweet_list .tweet_avatar img {

    width:60px;
    height:60px;

    }

    HTML 很简短,只是包含推文的包装:

    /*Tweet*/

    #tweet-wrap {
    padding-top: 20px;
    padding-bottom: 160px;
    width: 960px;
    height: 160px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;

    }

    非常感谢您的帮助。

    最佳答案

    您需要在适当的 css 文件中更改以下样式,

    .tweet_list li {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5em 0;
    list-style-type: none;
    vertical-align: middle;
    display: table;
    }

    .tweet_list .tweet_avatar {
    margin-right: 15px;
    float: left;
    padding: 0;
    }

    .tweet_time {
    display: table-cell;
    vertical-align: middle;
    height: 57px;
    min-width: 108px;
    padding-right: 3px;
    }

    .tweet_join {
    display: table-cell;
    vertical-align: middle;
    min-width: 56px;
    padding-right: 3px;
    }

    .tweet_text {
    display: table-cell;
    vertical-align: middle;
    }

    PS:... 功能的 css 修复(我们在聊天中讨论过)不适用于句子/嵌套的 html 元素,所以你会可能必须在 jQuery 中完成。

    关于jquery - 使用 Tweet jQuery 插件垂直对齐 <li> 文本和 <img>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13926210/

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