I have a problem with this sliding tap for news own my website.

我有一个问题,这个滑动水龙头的新闻拥有我的网站。

The problem is that the titles of the articles are over each other....

问题是文章的标题是相互的....

CSS:

background: none;
display: inline-block;
list-style: disc;
margin: 0 0 0 20px;
color: #fff;
letter-spacing: ;
float: left;
/* width: 300px; */
text-align: left;
}

and this's the code for marquee CSS:

这是marquee CSS的代码:

 display: inline-block;
 width: -webkit-fill-available;
 overflow: hidden;
 text-align: initial;
 /* width: 300px; */
 float: right;
 padding-left: 5px;
 padding-right: 5px;
 /* white-space: nowrap; */

HTML

<ul style="width: auto;">
    <marquee direction="right" scrolldelay="1" onmouseout="scrollAmount=7" onmouseover="scrollAmount=7" scrollamount="7">
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101099">الجيش المصري يفجّر 4 مساجد شمال سيناء</a>
        </li>
        <li style="/* list-style: none; */">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101098">بالصور.. "سبق" ترصد تضرر مساجد نجران من قذائف المليشيات الحوثية</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101097">افتتاح أول مسجد على أطلال كنيسة مهجورة في إيطاليا</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101096">حكم قبض اليدين في الصلاة</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101095">إمامة المسافر بالمقيم</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101094">ترك الصلاة</a>
        </li>
        <li style="list-style: none;"> 
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101092">حكم تكرار الجماعة في المسجد</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101090">بالصور.. "نورد كمال" أبعد مسجد على الكرة الأرضية</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101089">مسجد النقلة بدير البلح يكرم الملتزمين في صلاة الفجر</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101088">إنشاء أول مسجد مخصص للنساء في بريطانيا</a>
        </li>
    </marquee>
</ul>

1 个解决方案

#1


You made a lot of mistakes. Remove all floats first. Move ul inside marquee. Look at my code snippet:

你犯了很多错误。首先移除所有浮子。在选框内移动ul。看看我的代码片段:

ul {
  white-space: nowrap;
}

ul li {
  display: inline-block;
  margin: 0 0 0 20px;
  color: #fff;
  text-align: left;
}

marquee {
   display: block;
   overflow: hidden;
   padding-left: 5px;
   padding-right: 5px;
}
<marquee direction="right" scrolldelay="1" onmouseout="scrollAmount=7" onmouseover="scrollAmount=7" scrollamount="7">
<ul style="width: auto;">
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101099">الجيش المصري يفجّر 4 مساجد شمال سيناء</a>
        </li>
        <li style="/* list-style: none; */">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101098">بالصور.. "سبق" ترصد تضرر مساجد نجران من قذائف المليشيات الحوثية</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101097">افتتاح أول مسجد على أطلال كنيسة مهجورة في إيطاليا</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101096">حكم قبض اليدين في الصلاة</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101095">إمامة المسافر بالمقيم</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101094">ترك الصلاة</a>
        </li>
        <li style="list-style: none;"> 
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101092">حكم تكرار الجماعة في المسجد</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101090">بالصور.. "نورد كمال" أبعد مسجد على الكرة الأرضية</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101089">مسجد النقلة بدير البلح يكرم الملتزمين في صلاة الفجر</a>
        </li>
        <li style="list-style: none;">
            <img src="images/logonews.png" width="20" height="20" style="">
            <a href="art.php?id=1010101088">إنشاء أول مسجد مخصص للنساء في بريطانيا</a>
        </li>
</ul>
    </marquee>

更多相关文章

  1. php mail函数一段好的代码
  2. 用于上传多个文件的PHP代码
  3. (phpQuery)对网站产品信息采集代码的优化
  4. 韩顺平_php从入门到精通_视频教程_学习笔记_源代码图解_PPT文档
  5. 【MySQL 技巧分享】 mysql -e 加 v 简化代码
  6. Oracle相当于MySQL代码“插入虚拟”以返回错误消息
  7. 登录使用PHP并´t显示任何html代码
  8. 在代码点火器中从mysql迁移到postgresql
  9. 【动软.Net代码生成器】连接MySQL生成C#的POCO实体类(Model)

随机推荐

  1. Android 实现简单打电话
  2. 开源库android-state-button 为Android
  3. Android 根据item大小实现自动排列的Grid
  4. android 开发积累
  5. android实现上下滑动
  6. Android 拦截 HOME 按键
  7. android双击返回键退出程序
  8. Android使用SQLiteDatabase直接存取数据
  9. Android深入浅出之Audio第三部分Audio Po
  10. Android全屏设置的两种方式