在css中取消省略号

时间:2016-04-13 09:15:48

标签: html css ionic-framework

我正在开发一个时间表应用程序,我正在查看Activity_Date只显示启动时的日期和时间。但是,当我使用此代码时,它会缩短时间但显示省略号,任何帮助摆脱省略号都将不胜感激,谢谢。

的CSS:

public class Notepad {
    public static String jvmBitVersion() { //returning the JVM Version
        return System.getProperty("sun.arch.data.model");
    }

    public static void main(String[] args) throws InterruptedException {
        String jacobDllVersionToUse;
        System.out.println("JVM version is: " +jvmBitVersion());

        if (jvmBitVersion().contains("32")) {   //Checking for the JVM Version
            jacobDllVersionToUse = "jacob-1.18-M2-x86.dll"; // If the version is 32- bit use this.
        }
        else { // enter code here
            jacobDllVersionToUse = "jacob-1.18-M2-x64.dll"; // if the version is 64-bit go for this
        }

        File file = new File("lib", jacobDllVersionToUse); // file location for jacob
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());

        AutoItX x = new AutoItX();
        x.run("notepad.exe"); // trying to open the notepad

        x.winActivate("Untitled - Notepad"); // waiting for the notepad to open
        x.winWaitActive("Untitled - Notepad");

        x.send("This is some text"); // Once the notepad is open write into it.

    }
}

HTML:

.mydate{
  white-space: nowrap;
  width: 6em;
  overflow: hidden;
}

JSON:

<ion-content>
        <ion-refresher on-refresh="doRefresh()"></ion-refresher>
        <div class="day">

            <div class="item item-divider item-divider-calm item-icon icon-left">
                <i class="icon ion-ios-alarm-outline"> Monday</i>
            </div>
            <ion-list>
                <ion-item ng-show="item.Location" ng-repeat="item in test | filter: {Day: 'Mon'}" class="item item-list ">
                    <table style="width:300px; table-layout:fixed;">
                        <tr>
                            <td>
                                Course
                            </td>
                            <td style="white-space: pre-line;">{{item.Register_Description}}</td>
                        </tr>
                        <tr>
                            <td>
                                Tutor
                            </td>
                            <td style="white-space: pre-line;">{{item.Staff_Name}}</td>
                        </tr>
                        <tr>
                            <td>
                                Campus
                            </td>
                            <td style="white-space: pre-line;">{{item.Campus}}</td>
                        </tr>
                        <tr>
                            <td>
                                Location
                            </td>
                            <td style="white-space: pre-line;">{{item.Location}}</td>
                        </tr>

                        <tr>
                            <td>
                                Date
                            </td>
                            <td><p class="mydate">{{item.Activity_Date.date}}</p></td>
                        </tr>
                        <tr>
                            <td>
                                Start Time
                            </td>
                            <td style="white-space: pre-line;">{{item.Activity_Start_Time}}</td>
                        </tr>
                        <tr>
                            <td>
                                End Time
                            </td>
                            <td style="white-space: pre-line;">{{item.Activity_End_Time}}</td>
                        </tr>
                        <tr>
                            <td>
                                Timetabled Hours
                            </td>
                            <td style="white-space: pre-line;">{{item.Timetabled_Hours}}</td>
                        </tr>
                        <tr>
                            <td>
                                Register
                            </td>
                            <td style="white-space: pre-line;">{{item.Register}}</td>
                        </tr>

                    </table>

                </ion-item>
            </ion-list>
        </div>

日期如何通过: 2015-09-16 00:00:00.000

当前输出: 2015年9月16日...

期望的输出: 2015-09-16或16-09-2015

1 个答案:

答案 0 :(得分:2)

如果你不想要省略号,那么只需删除text-overflow属性

.mydate{
   white-space: nowrap;
   width: 6em;
   overflow: hidden;
}
  

在你的css text-overflow通过删除它生成省略号效果时,省略号效果将被删除,文本将显示直到定义的宽度