css连接
Developers have loads to think about when creative websites, and much of that is ensuring child elements don't stretch past the parent width. We worry about images, IFRAMEs, and other popular elements pushing past their parent width, but then we see a basic link with a long URL and we look down, just shaking our heads. Why doesn't the URL just break?
开发人员需要考虑何时创建创意网站,其中大部分是确保子元素不会超出父元素的宽度。 我们担心图像,IFRAME和其他流行元素会超出其父级宽度,但是随后我们看到一个基本链接的URL长,然后我们低下头,只是摇了摇头。 为什么URL不会中断?
To prevent that issue, you can apply the following CSS:
为避免该问题,您可以应用以下CSS:
/*
Problem:
<a href="">//someurl.com/a-really-really-really-really-really-really-really-really-really-long-url</a>
*/
a {
word-wrap: break-word;
}
Should this be a global setting for A
elements, or simply something that we as developers should set? Surely this is an annoyance we shouldn't have to deal with, right?
这应该是A
元素的全局设置,还是仅仅是我们作为开发人员应该设置的内容? 当然这是我们不应该处理的烦恼,对吗?
css连接