gpt4 book ai didi

css - 在使用 WordPress 时尝试防止 CSS 中的自动换行

转载 作者:太空宇宙 更新时间:2023-11-03 18:40:05 26 4
gpt4 key购买 nike

我有一个网站,我正在使用我试图修改的 Wordpress 主题。如果你去网站

http://66.147.244.132/~dokkanca/

然后向下滚动到“8 月 10 日之前的斋月特价”的位置,您会注意到丝带形式的标题栏换行到下一行。我不想这样,但我不知道如何防止这种情况。我花了很多时间尝试更改相关 CSS 代码中的参数,但不幸的是我没有成功。有人可以告诉我如何更正这个问题,使标题周围的丝带直接穿过,而不是换行到下一行吗?在我的 wordpress 选项中,功能区中的这个标题称为“底部 slider 标题”。下面是我的相关 CSS 代码:

.home-title{width:265px;color:#ffffff;font-family:'Merienda One', sans-serif;font-size:18px;text-shadow: 0 1px 0 rgba(30, 30, 30, 0.6);position:relative;padding:0px 0px 4px 10px;margin:0;}
.home-img{margin:10px 0px 10px 0px;display:block;overflow: hidden;border:2px solid #e9e9e9;}
.home-img .mask{width: 100%;height:100%;position: absolute;overflow: hidden;top:0;left:0;}
.home-img span.link-img {background:url("images/link-img.png") no-repeat 0 0;
display:block;
width:31px;
height:37px;
text-indent:-9999px;
margin-left:45%;
-webkit-transform: translateY(-160px);
-moz-transform: translateY(-160px);
-o-transform: translateY(-160px);
-ms-transform: translateY(-160px);
transform: translateY(-160px);
-webkit-transition: all 0.2s ease-in-out 0s;
-moz-transition: all 0.2s ease-in-out 0s;
-o-transition: all 0.2s ease-in-out 0s;
-ms-transition: all 0.2s ease-in-out 0s;
transition: all 0.2s ease-in-out 0s;
}
.home-img:hover span.link-img{-webkit-transform: translateY(45px);
-moz-transform: translateY(45px);
-o-transform: translateY(45px);
-ms-transform: translateY(45px);
transform: translateY(45px);
-webkit-transition: all 0.4s linear;
-moz-transition: all 0.4s linear;
-o-transition: all 0.4s linear;
-ms-transition: all 0.4s linear;
transition: all 0.4s linear;}


.home-img, .post_image img, .img-left-post img{-webkit-transition: border-color 0.5s ease;-moz-transition: border-color 0.5s ease;-o-transition: border-color 0.5s ease;transition: border-color 0.5s ease;display: block;position: relative;}
.home-img:hover, .post_image:hover img, .img-left-post img:hover{-webkit-transition: border-color 0.5s ease;-moz-transition: border-color 0.5s ease;-o-transition: border-color 0.5s ease;transition: border-color 0.5s ease;}
.home-img .mask, .post_image .mask2{background-color: rgba(0, 0, 0, 0.2);-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); opacity: 0; -webkit-transition: all 0.3s ease-out 0.3s;-moz-transition: all 0.3s ease-out 0.3s;-o-transition: all 0.3s ease-out 0.3s;-ms-transition: all 0.3s ease-out 0.3s;transition: all 0.3s ease-out 0.3s;}
.home-img:hover .mask, .post_image:hover .mask2{-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";filter: alpha(opacity=100);opacity: 1;-webkit-transition: all 0.3s ease-out 0s;-moz-transition: all 0.3s ease-out 0s;-o-transition: all 0.3s ease-out 0s;-ms-transition: all 0.3s ease-out 0s;transition: all 0.3s ease-out 0s;}

.home-bottom{margin-top:30px;}

.text-right{float:right;display:block;}

.home-bottom .home-title{margin-bottom:40px;}
.home-time{font-size:11px;color:#858585;font-family:Georgia, "Times New Roman", Times, serif; font-style:italic;}
.home-post-title{padding:0;margin-bottom:5px;}
.home-post-title a{font-size:14px;}

提前感谢所有回复的人。

最佳答案

它是环绕的,因为您将 .home-title 设置为 width:265px;。增加值(value),它将解决您的问题。编辑: 为了不干扰带有 .home-title 的其他元素,看看您是否可以为该元素分配第二个类,并使用新的宽度值 > 265px。另一种选择是这样的规则:.container .span8 .home-title {width: put new width here}

关于css - 在使用 WordPress 时尝试防止 CSS 中的自动换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17801087/

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